<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/test/test_generators.py, branch v2.2.3</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_generators.py?h=v2.2.3</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_generators.py?h=v2.2.3'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2002-10-07T01:18:17Z</updated>
<entry>
<title>Whitespace normalization.</title>
<updated>2002-10-07T01:18:17Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2002-10-07T01:18:17Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=e40add41ccfb6560756051f79339286cd84180bb'/>
<id>urn:sha1:e40add41ccfb6560756051f79339286cd84180bb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Backport:</title>
<updated>2002-06-12T03:48:46Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2002-06-12T03:48:46Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=9d21cd7e1ac79097a87654ec2ed9c85d3b963e5e'/>
<id>urn:sha1:9d21cd7e1ac79097a87654ec2ed9c85d3b963e5e</id>
<content type='text'>
SF bug 567538: Generator can crash the interpreter (Finn Bock).

This was a simple typo.  Strange that the compiler didn't catch it!
Instead of WHY_CONTINUE, two tests used CONTINUE_LOOP, which isn't a
why_code at all, but an opcode; but even though 'why' is declared as
an enum, comparing it to an int is apparently not even worth a
warning -- not in gcc, and not in VC++. :-(
</content>
</entry>
<entry>
<title>SF bug #488514: -Qnew needs work</title>
<updated>2001-12-06T06:23:26Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-12-06T06:23:26Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=3caca2326e04ea3c0d1f8c6a588e646d8201af38'/>
<id>urn:sha1:3caca2326e04ea3c0d1f8c6a588e646d8201af38</id>
<content type='text'>
Big Hammer to implement -Qnew as PEP 238 says it should work (a global
option affecting all instances of "/").

pydebug.h, main.c, pythonrun.c:  define a private _Py_QnewFlag flag, true
iff -Qnew is passed on the command line.  This should go away (as the
comments say) when true division becomes The Rule.  This is
deliberately not exposed to runtime inspection or modification:  it's
a one-way one-shot switch to pretend you're using Python 3.

ceval.c:  when _Py_QnewFlag is set, treat BINARY_DIVIDE as
BINARY_TRUE_DIVIDE.

test_{descr, generators, zipfile}.py:  fiddle so these pass under
-Qnew too.  This was just a matter of s!/!//! in test_generators and
test_zipfile.  test_descr was trickier, as testbinop() is passed
assumptions that "/" is the same as calling a "__div__" method; put
a temporary hack there to call "__truediv__" instead when the method
name is "__div__" and 1/2 evaluates to 0.5.

Three standard tests still fail under -Qnew (on Windows; somebody
please try the Linux tests with -Qnew too!  Linux runs a whole bunch
of tests Windows doesn't):
    test_augassign
    test_class
    test_coercion
I can't stay awake longer to stare at this (be my guest).  Offhand
cures weren't obvious, nor was it even obvious that cures are possible
without major hackery.

Question:  when -Qnew is in effect, should calls to __div__ magically
change into calls to __truediv__?  See "major hackery" at tail end of
last paragraph &lt;wink&gt;.
</content>
</entry>
<entry>
<title>Teach regrtest how to pass on doctest failure msgs.  This is done via a</title>
<updated>2001-09-09T06:12:01Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-09-09T06:12:01Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=a0a62225094a890c1b07ebc4f89e4c7c45c66b13'/>
<id>urn:sha1:a0a62225094a890c1b07ebc4f89e4c7c45c66b13</id>
<content type='text'>
horridly inefficient hack in regrtest's Compare class, but it's about as
clean as can be:  regrtest has to set up the Compare instance before
importing a test module, and by the time the module *is* imported it's too
late to change that decision.  The good news is that the more tests we
convert to unittest and doctest, the less the inefficiency here matters.
Even now there are few tests with large expected-output files (the new
cost here is a Python-level call per .write() when there's an expected-
output file).
</content>
</entry>
<entry>
<title>Make dir() wordier (see the new docstring).  The new behavior is a mixed</title>
<updated>2001-09-03T05:47:38Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-09-03T05:47:38Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=5d2b77cf31c5a3cbabc74936831480b9caea3a12'/>
<id>urn:sha1:5d2b77cf31c5a3cbabc74936831480b9caea3a12</id>
<content type='text'>
bag.  It's clearly wrong for classic classes, at heart because a classic
class doesn't have a __class__ attribute, and I'm unclear on whether
that's feature or bug.  I'll repair this once I find out (in the
meantime, dir() applied to classic classes won't find the base classes,
while dir() applied to a classic-class instance *will* find the base
classes but not *their* base classes).

Please give the new dir() a try and see whether you love it or hate it.
The new dir([]) behavior is something I could come to love.  Here's
something to hate:

&gt;&gt;&gt; class C:
...     pass
...
&gt;&gt;&gt; c = C()
&gt;&gt;&gt; dir(c)
['__doc__', '__module__']
&gt;&gt;&gt;

The idea that an instance has a __doc__ attribute is jarring (of course
it's really c.__class__.__doc__ == C.__doc__; likewise for __module__).

OTOH, the code already has too many special cases, and dir(x) doesn't
have a compelling or clear purpose when x isn't a module.
</content>
</entry>
<entry>
<title>The change of type(None).__name__ from 'None' to 'NoneType' broke this</title>
<updated>2001-08-16T08:32:39Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-08-16T08:32:39Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=297abadc6b871c61388c3df2e5e7b3e531a9a813'/>
<id>urn:sha1:297abadc6b871c61388c3df2e5e7b3e531a9a813</id>
<content type='text'>
test in a trivial way.  Fixed.
</content>
</entry>
<entry>
<title>Move one of the tests into the "PEP 255" section, to reflect a change in</title>
<updated>2001-08-15T04:41:19Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-08-15T04:41:19Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=e5614630fb1f73dd314945f6ccc871abb33e457e'/>
<id>urn:sha1:e5614630fb1f73dd314945f6ccc871abb33e457e</id>
<content type='text'>
the PEP.
</content>
</entry>
<entry>
<title>The message accompanying the TypeError exception on a readonly</title>
<updated>2001-08-10T21:25:24Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-08-10T21:25:24Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=61cf780b6dba2f1381391a9a7d406a12d7a415da'/>
<id>urn:sha1:61cf780b6dba2f1381391a9a7d406a12d7a415da</id>
<content type='text'>
attribute changed again.
</content>
</entry>
<entry>
<title>Merge of descr-branch back into trunk.</title>
<updated>2001-08-02T04:15:00Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-08-02T04:15:00Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=6d6c1a35e08b95a83dbe47dbd9e6474daff00354'/>
<id>urn:sha1:6d6c1a35e08b95a83dbe47dbd9e6474daff00354</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Part way to allowing "from __future__ import generators" to communicate</title>
<updated>2001-07-16T02:29:45Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-07-16T02:29:45Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=5ba58662817b708a453020f0425fe4747ea6d5cb'/>
<id>urn:sha1:5ba58662817b708a453020f0425fe4747ea6d5cb</id>
<content type='text'>
that info to code dynamically compiled *by* code compiled with generators
enabled.  Doesn't yet work because there's still no way to tell the parser
that "yield" is OK (unlike nested_scopes, the parser has its fingers in
this too).
Replaced PyEval_GetNestedScopes by a more-general
PyEval_MergeCompilerFlags.  Perhaps I should not have?  I doubted it was
*intended* to be part of the public API, so just did.
</content>
</entry>
</feed>
