[storm] Dangerous initialisation of storm.properties.Property

Barry Warsaw barry at canonical.com
Tue Aug 23 15:13:09 UTC 2011


On Aug 23, 2011, at 12:57 PM, Jamu Kakar wrote:

>Anyway, I tend to agree that defining an empty dict in a keyword
>argument isn't so great, but I guess it was a micro-optimization to
>avoid creating a new empty dict for every Property that gets
>instantiated.

Yeah, it's definitely not considered good practice to assign a default
argument to a mutable object.

-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/storm/attachments/20110823/efefdeb4/attachment.pgp>


More information about the storm mailing list