Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv17523/test Modified Files: test_userdict.py Log Message: Implement dict() style constructor. Already supported dict() and dict(mapping). Now supports dict(itemsequence) and Just van Rossum's new syntax for dict(keywordargs). Also, added related unittests. The docs already promise dict-like behavior so no update is needed there. Index: test_userdict.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_userdict.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** test_userdict.py 18 Nov 2002 04:34:10 -0000 1.8 --- test_userdict.py 22 Nov 2002 00:07:40 -0000 1.9 *************** *** 20,23 **** --- 20,26 ---- uu2 = UserDict(u2) + verify(UserDict(one=1, two=2) == d2) # keyword arg constructor + verify(UserDict([('one',1), ('two',2)]) == d2) # item sequence constructor + # Test __repr__
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4