Message1375

Author kzuberi
Recipients
Date 2006-12-19.20:43:58
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Christian Junker reports on jython-users:

"""
It seems like the fromkeys method of the dict class is not correctly
implemented in Jython 2.2a1:

>>> dict.fromkeys(['k1', 'k2'])
Traceback (innermost last):
 File "<console>", line 1, in ?
TypeError: descriptor 'fromkeys' requires 'dict' object but received a 'list'

It should require an iterable, not a dict as first argument.
"""

Note dict.fromkeys() was added to cpython in 2.3, but we are implementing it in 2.2 (as we do with a few other 2.3 features). 

- kz
History
Date User Action Args
2008-02-20 17:17:38adminlinkissue1619040 messages
2008-02-20 17:17:38admincreate