The PEP 3100:
says:
Return iterators instead of lists where appropriate for atomic type
methods (e.g. dict.keys(), dict.values(), dict.items(), etc.); iter*
methods will be removed. Better: make keys(), etc. return views ala
Java collections???
....
To be removed:
dict.setdefault ()? [15]
dict.has_key() method [done]
I may be sleepy now, but maybe the keys() method too can be removed;
otherwise the following two become really the same:
print list(adict)
for k in adict: ...
print list(adict.keys ())
for k in adict.keys(): ...
Bye,
bearophile
says:
Return iterators instead of lists where appropriate for atomic type
methods (e.g. dict.keys(), dict.values(), dict.items(), etc.); iter*
methods will be removed. Better: make keys(), etc. return views ala
Java collections???
....
To be removed:
dict.setdefault ()? [15]
dict.has_key() method [done]
I may be sleepy now, but maybe the keys() method too can be removed;
otherwise the following two become really the same:
print list(adict)
for k in adict: ...
print list(adict.keys ())
for k in adict.keys(): ...
Bye,
bearophile
Comment