diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-10-27 18:27:48 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-10-27 18:27:48 (GMT) |
commit | 4d85953fe609197c54827826963eabaf6418024c (patch) | |
tree | 4e95540cd87738a3a754566c263200d50ddc54fd /Lib | |
parent | c2f011201ae374da4544b93aba09d0279c139c18 (diff) | |
download | cpython-4d85953fe609197c54827826963eabaf6418024c.zip cpython-4d85953fe609197c54827826963eabaf6418024c.tar.gz cpython-4d85953fe609197c54827826963eabaf6418024c.tar.bz2 |
dictionary() constructor:
+ Change keyword arg name from "x" to "items". People passing a mapping
object can stretch their imaginations <wink>.
+ Simplify the docstring text.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_descr.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index f5daf26..97e92da 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -178,12 +178,12 @@ def dict_constructor(): vereq(d, {}) d = dictionary({}) vereq(d, {}) - d = dictionary(x={}) + d = dictionary(items={}) vereq(d, {}) d = dictionary({1: 2, 'a': 'b'}) vereq(d, {1: 2, 'a': 'b'}) vereq(d, dictionary(d.items())) - vereq(d, dictionary(x=d.iteritems())) + vereq(d, dictionary(items=d.iteritems())) for badarg in 0, 0L, 0j, "0", [0], (0,): try: dictionary(badarg) @@ -226,7 +226,7 @@ def dict_constructor(): Mapping.keys = lambda self: self.dict.keys() Mapping.__getitem__ = lambda self, i: self.dict[i] - d = dictionary(x=Mapping()) + d = dictionary(items=Mapping()) vereq(d, Mapping.dict) # Init from sequence of iterable objects, each producing a 2-sequence. @@ -1865,7 +1865,7 @@ def keywords(): vereq(unicode(string='abc', errors='strict'), u'abc') vereq(tuple(sequence=range(3)), (0, 1, 2)) vereq(list(sequence=(0, 1, 2)), range(3)) - vereq(dictionary(x={1: 2}), {1: 2}) + vereq(dictionary(items={1: 2}), {1: 2}) for constructor in (int, float, long, complex, str, unicode, tuple, list, dictionary, file): |