diff options
author | Just van Rossum <just@letterror.com> | 2002-11-23 09:45:04 (GMT) |
---|---|---|
committer | Just van Rossum <just@letterror.com> | 2002-11-23 09:45:04 (GMT) |
commit | a797d8150dd6fd8336653d8e91db3c088f2c53ff (patch) | |
tree | 02fd69d522c9e7477b11e3cc530f7181d3d052f2 /Misc | |
parent | e17af7b3dbb0ebc6fea7e55052833564ca59d104 (diff) | |
download | cpython-a797d8150dd6fd8336653d8e91db3c088f2c53ff.zip cpython-a797d8150dd6fd8336653d8e91db3c088f2c53ff.tar.gz cpython-a797d8150dd6fd8336653d8e91db3c088f2c53ff.tar.bz2 |
Patch #642500 with slight modifications: allow keyword arguments in
dict() constructor. Example:
>>> dict(a=1, b=2)
{'a': 1, 'b': 2}
>>>
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -11,6 +11,12 @@ What's New in Python 2.3 alpha 1? Type/class unification and new-style classes -------------------------------------------- +- dict() now accepts keyword arguments so that dict(one=1,two=2) + is the equivalent of dict([('one',1),('two',2)]). Accordingly, + the existing (but undocumented) 'items' keyword argument has + been eliminated. This means that dict(items=someMapping) now has + a different meaning than before. + - int() now returns a long object if the argument is outside the integer range, so int("4"*1000), int(1e200) and int(1L<<1000) will all return long objects instead of raising an OverflowError. |