In article <0bd314a8-db65-43f1-a999->,
dmitrey <> wrote:
>
>Python 2.6.5 r265:79063
>>>>set().update(set()) is None
>True
>while I expect result of update to be set.
>Also, result of
>set().add(None)
>is None while I expect it to be set with element None (or, maybe, it
>should be empty set?)
Why are you assuming that your expectations are correct? Generally
speaking, Python methods that mutate do *not* return the original object,
precisely to make sure you don't make stupid mistakes.
You should probably read this:
http://www.catb.org/~esr/faqs/smart-questions.html
--
Aahz () <*>
http://www.pythoncraft.com/
"It is easier to optimize correct code than to correct optimized code."
--Bill Harlan