Discussion:
[Erp5-dev] OOoDocument_updateMetadata.xml - why not default to list?
Łukasz Nowak
2007-12-19 14:31:25 UTC
Permalink
Hello,

In 18416 I've seen, that value_list is default to None, but it might be
default to list, so code would be simpler (attached).

As I'm doing such "code readiblity optimisation" I'd like to know if is
it not performance drawback (or maybe performance advantage?) to default
to [] instead of None in such cases.

Spying erp5-report as always ;-),
Regards,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...'' I am only craftsman.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OOoDocument_updateMetadata.xml-less-if.patch
Type: text/x-patch
Size: 817 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20071219/cc65b1cc/attachment.bin>
Yusei TAHARA
2007-12-19 14:46:33 UTC
Permalink
Hello ?ukasz,

On Wed, 19 Dec 2007 15:31:25 +0100
Post by Łukasz Nowak
Hello,
In 18416 I've seen, that value_list is default to None, but it might be
default to list, so code would be simpler (attached).
As I'm doing such "code readiblity optimisation" I'd like to know if is
it not performance drawback (or maybe performance advantage?) to default
to [] instead of None in such cases.
Spying erp5-report as always ;-),
Regards,
Luke
My purpose is that I'd like to set value only if inputted value exists.
if default is [] instead, then value will be ''(empty string)
even if listfield is not exists in form.
--
Yusei TAHARA <yusei at nexedi.com>
Loading...