This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients alexandre.vassalotti, belopolsky, fdrake, mark.dickinson, pitrou
Date 2010-06-29.20:10:58
SpamBayes Score 0.0003103322
Marked as misclassified No
Message-id <1277842261.19.0.784416341252.issue9120@psf.upfronthosting.co.za>
In-reply-to
Content
It is both space and time optimization.

Fred was a proponent of small pickle sizes in the past, so I am adding him to the nosy list.

I am not too keen on this to happen, though.  It just seemed more natural to me not to create an empty list to unpickle an empty set.

By the same logic, allowing set() as an alternative to set([]) in python code is "premature optimization".

The patched code is a bit cleaner than the original without goto's and unnecessary XDECREFs.  (I am not sure what the latest word on redundant initializations is, so I kept =NULLs intact.)

On the other hand collections.deque does not optimize empty case either.
History
Date User Action Args
2010-06-29 20:11:01belopolskysetrecipients: + belopolsky, fdrake, mark.dickinson, pitrou, alexandre.vassalotti
2010-06-29 20:11:01belopolskysetmessageid: <1277842261.19.0.784416341252.issue9120@psf.upfronthosting.co.za>
2010-06-29 20:10:59belopolskylinkissue9120 messages
2010-06-29 20:10:58belopolskycreate