Python v2.3 and dict.fromkeys() suggestion
Mark J
maj64 at hotmail.com
Fri Jun 13 04:51:01 EDT 2003
So let me try another tack...
Can anyone tell me what I'm missing with regard to the preference for
dict.fromkeys() to be a classmethod/constructor versus a regular
method?
In addition to the latter increasing the range of application, the
dictionary interface wouldn't even have to be expanded -- you could
"overload" dict.update() to check its argument type and just Do The
Right Thing...
Thanks,
Mike
More information about the Python-list
mailing list