diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-08-02 04:15:00 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-08-02 04:15:00 (GMT) |
commit | 6d6c1a35e08b95a83dbe47dbd9e6474daff00354 (patch) | |
tree | 542089077b9c2650dcf5c52d6bfcef1baf12d176 /Lib/test/test_generators.py | |
parent | 52d55a392600011d3edfe85c694744ec550ad1fe (diff) | |
download | cpython-6d6c1a35e08b95a83dbe47dbd9e6474daff00354.zip cpython-6d6c1a35e08b95a83dbe47dbd9e6474daff00354.tar.gz cpython-6d6c1a35e08b95a83dbe47dbd9e6474daff00354.tar.bz2 |
Merge of descr-branch back into trunk.
Diffstat (limited to 'Lib/test/test_generators.py')
-rw-r--r-- | Lib/test/test_generators.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py index 2a174c3..72a70ec 100644 --- a/Lib/test/test_generators.py +++ b/Lib/test/test_generators.py @@ -380,10 +380,16 @@ From the Iterators list, about the types of these things. >>> i = g() >>> type(i) <type 'generator'> + +XXX dir(object) *generally* doesn't return useful stuff in descr-branch. >>> dir(i) +[] + +Was hoping to see this instead: ['gi_frame', 'gi_running', 'next'] + >>> print i.next.__doc__ -next() -- get the next value, or raise StopIteration +x.next() -> the next value, or raise StopIteration >>> iter(i) is i 1 >>> import types @@ -399,7 +405,7 @@ And more, added later. >>> i.gi_running = 42 Traceback (most recent call last): ... -TypeError: object has read-only attributes +TypeError: 'generator' object has only read-only attributes (assign to .gi_running) >>> def g(): ... yield me.gi_running >>> me = g() |