Re: [Python-Dev] bool(iter([])) changed between 2.3 and 2.4

Sept. 20, 2005
7:23 p.m.
Fred L. Drake, Jr. wrote:
In any case, it's simple to get the 2.3 behaviour back - just add __nonzero__. I think that could validly be considered a bugfix. Tim Delaney

September 2005
7:34 p.m.
New subject: bool(iter([])) changed between 2.3 and 2.4
On 9/20/05, Delaney, Timothy (Tim) <tdelaney@avaya.com> wrote:
In any case, it's simple to get the 2.3 behaviour back - just add __nonzero__. I think that could validly be considered a bugfix.
Alas not -- it would still be a functionality change relative to 2.4 and 2.4.1. Also, an object whose __len__() returns 0 but whose __nonzero__() returns True would be an anomaly. The best we can do IMO is to change it back in 2.5. -- --Guido van Rossum (home page: http://www.python.org/~guido/)
7115
Age (days ago)
7115
Last active (days ago)
1 comments
2 participants
participants (2)
-
Delaney, Timothy (Tim)
-
Guido van Rossum