summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_genexps.py
Commit message (Collapse)AuthorAgeFilesLines
* Make generator repr consistent with function and code object repr.Georg Brandl2008-05-161-1/+1
|
* Fixed typo in a doctest of test_genexps.Alexandre Vassalotti2008-05-151-1/+1
|
* #2863: add gen.__name__ and add this name to generator repr().Georg Brandl2008-05-151-1/+1
|
* Patch #1507676: improve exception messages in abstract.c, object.c and ↵Georg Brandl2006-06-181-1/+1
| | | | typeobject.c.
* Fix one of the tests that fails on the "x86 OpenBSD trunk" buildbot, dueTim Peters2006-04-101-1/+1
| | | | | to that id() may return a long on a 32-bit box now. On a box that assigns addresses "with the sign bit set", id() always returns a long now.
* Improved handling of syntax errors.Jeremy Hylton2006-01-271-1/+1
| | | | | | | | | | | | | | | | | Expand set of errors caught in set_context(). Some new errors, some old error messages changed for consistency. Fixed error checking in generator expression code. The first set of tests were impossible condition given the grammar. In general, the ast code uses REQ() for those sanity checks. Fix some error handling for augmented assignments. As comments in the code explain, set_context() ought to work here, but I got unexpected crashes when I tried it. Should come back to this. Add note to Grammar that yield expression is a special case. Add doctest cases for SyntaxErrors raised by ast.c.
* Fix SF bug #1167751, Argument genexp corner caseNeal Norwitz2005-10-211-2/+14
| | | | | | | | | | | | | Incorrect code was generated for: foo(a = i for i in range(10)) This should have generated a SyntaxError. Fix the Grammar so it raises a SyntaxError and test it. I'm uncertain whether this should be backported. It makes something that was Syntactically valid invalid. However, the code would either be completely broken or do the wrong thing.
* Merge ast-branch to headJeremy Hylton2005-10-201-3/+2
| | | | | | | | | | This change implements a new bytecode compiler, based on a transformation of the parse tree to an abstract syntax defined in Parser/Python.asdl. The compiler implementation is not complete, but it is in stable enough shape to run the entire test suite excepting two disabled tests.
* PEP 342 implementation. Per Guido's comments, the generator throw()Phillip J. Eby2005-08-021-1/+1
| | | | | method still needs to support string exceptions, and allow None for the third argument. Documentation updates are needed, too.
* Add tests for syntax errors.Raymond Hettinger2004-09-301-0/+13
|
* Improve test coverage.Raymond Hettinger2004-09-301-1/+0
|
* Minor formatting cleanup.Raymond Hettinger2004-08-161-5/+6
|
* * Uncomment the SyntaxError doctest after Tim demonstrated how.Raymond Hettinger2004-08-161-11/+6
| | | | * Remove unnecessary sys.PS2 prompt lines.
* Whitespace normalization.Tim Peters2004-07-081-6/+0
|
* Add a test to verify an early call to iter() on the outermost forRaymond Hettinger2004-05-201-0/+9
| | | | expression.
* SF patch #872326: Generator expression implementationRaymond Hettinger2004-05-191-0/+258
(Code contributed by Jiwon Seo.) The documentation portion of the patch is being re-worked and will be checked-in soon. Likewise, PEP 289 will be updated to reflect Guido's rationale for the design decisions on binding behavior (as described in in his patch comments and in discussions on python-dev). The test file, test_genexps.py, is written in doctest format and is meant to exercise all aspects of the the patch. Further additions are welcome from everyone. Please stress test this new feature as much as possible before the alpha release.