[BangPypers] Truth Tests (bool)

Sreenivas Reddy T thatiparthysreenivas at gmail.com
Tue Jan 17 11:14:16 CET 2012

> This is an interesting point especially with Python3 returning something
> other than lists for things like dict.keys. I'll dig into this a
> little.
> Thanks.
Noufal,if haven't gone through ,

>From the PEP -3106.
"This PEP proposes to change the .keys(), .values() and .items() methods of
the built-in dict type to return a set-like or unordered container object
whose contents are derived from the underlying dictionary rather than a
list which is a copy of the keys, etc.; and to remove the .iterkeys(),
.itervalues() and .iteritems() methods."


Please see the pseudo-code  at the bottom,they override __len__ magic

More information about the BangPypers mailing list