> > > 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." http://www.python.org/dev/peps/pep-3106/ Please see the pseudo-code at the bottom,they override __len__ magic method. _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers