[Python-checkins] python/dist/src/Misc NEWS,1.548,1.549
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Wed, 27 Nov 2002 05:10:43 -0800
Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1:/tmp/cvs-serv12051
Modified Files:
NEWS
Log Message:
Rephrase dict.fromkeys() news.
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.548
retrieving revision 1.549
diff -C2 -d -r1.548 -r1.549
*** NEWS 27 Nov 2002 07:29:32 -0000 1.548
--- NEWS 27 Nov 2002 13:10:40 -0000 1.549
***************
*** 271,278 ****
example, "Foo!!!?!?!?".rstrip("?!") -> "Foo".
! - Dictionaries have a new class method, fromkeys(iterable, value=None).
! It constructs a new dictionary with keys taken from the iterable and
! all values set to a single value. It is used for building membership
! tests and for removing duplicates from sequences.
- Added a new dict method pop(key). This removes and returns the
--- 271,279 ----
example, "Foo!!!?!?!?".rstrip("?!") -> "Foo".
! - There's a new dictionary constructor (a class method of the dict
! class), dict.fromkeys(iterable, value=None). It constructs a
! dictionary with keys taken from the iterable and all values set to a
! single value. It can be used for building sets and for removing
! duplicates from sequences.
- Added a new dict method pop(key). This removes and returns the