Newbie Questions: Swithing from Perl to Python
John J. Lee
jjl at pobox.com
Sun Oct 26 16:21:28 EST 2003
Alex Martelli <aleaxit at yahoo.com> writes:
[...]
> In theory, classmethods do allow somewhat confusing use, e.g.:
>
> myDict = {}
> another = myDict.fromkeys(range(7))
>
> this leaves myDict untouched and doesn't even look into it, except
> for ascertaining its class. Apparently, people aren't actually prone
> to falling into such confusions (haven't seen _any_ occurrence wrt
> fromkeys either here, on help at python.org, on python-dev, or any
> other venue where I help, advise and teach).
[...]
That might be because people just don't know about it's existence yet.
I didn't, until you mentioned it.
John
More information about the Python-list
mailing list