summaryrefslogtreecommitdiffstats
path: root/Include/graminit.h
Commit message (Collapse)AuthorAgeFilesLines
* Issue #2333: Backport set and dict comprehensions syntax.Alexandre Vassalotti2010-01-111-4/+4
|
* Issue #2335: Backport set literals syntax from Python 3.x.Alexandre Vassalotti2010-01-091-12/+13
|
* Allow multiple context managers in one with statement, as proposedGeorg Brandl2009-05-251-1/+1
| | | | | | | in http://codereview.appspot.com/53094 and accepted by Guido. The construct is transformed into multiple With AST nodes so that there should be no problems with the semantics.
* #2627 Let it be known what pgen generatesBenjamin Peterson2008-04-131-0/+2
|
* Patch #1759: Backport of PEP 3129 class decoratorsChristian Heimes2008-02-231-79/+80
| | | | with some help from Georg
* PEP 343 -- the with-statement.Guido van Rossum2006-02-271-42/+44
| | | | | | | | | | | | | This was started by Mike Bland and completed by Guido (with help from Neal). This still needs a __future__ statement added; Thomas is working on Michael's patch for that aspect. There's a small amount of code cleanup and refactoring in ast.c, compile.c and ceval.c (I fixed the lltrace behavior when EXT_POP is used -- however I had to make lltrace a static global).
* PEP 308 implementation, including minor refdocs and some testcases. ItThomas Wouters2006-02-271-37/+40
| | | | | | | | | | | | | | | | | | | | | | | | | breaks the parser module, because it adds the if/else construct as well as two new grammar rules for backward compatibility. If no one else fixes parsermodule, I guess I'll go ahead and fix it later this week. The TeX code was checked with texcheck.py, but not rendered. There is actually a slight incompatibility: >>> (x for x in lambda:0) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: iteration over non-sequence changes into >>> (x for x in lambda: 0) File "<stdin>", line 1 (x for x in lambda: 0) ^ SyntaxError: invalid syntax Since there's no way the former version can be useful, it's probably a bugfix ;)
* PEP 342 implementation. Per Guido's comments, the generator throw()Phillip J. Eby2005-08-021-0/+1
| | | | | method still needs to support string exceptions, and allow None for the third argument. Documentation updates are needed, too.
* SF patch #1007189, multi-line imports, for instance:Anthony Baxter2004-08-311-49/+53
| | | | | "from blah import (foo, bar baz, bongo)"
* PEP-0318, @decorator-style. In Guido's words:Anthony Baxter2004-08-021-69/+71
| | | | | "@ seems the syntax that everybody can hate equally" Implementation by Mark Russell, from SF #979728.
* SF patch #872326: Generator expression implementationRaymond Hettinger2004-05-191-17/+21
| | | | | | | | | | | | | | (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.
* Patch #534304: Implement phase 1 of PEP 263.Martin v. Löwis2002-08-041-0/+1
|
* Disambiguate the grammar for backtick.Guido van Rossum2002-05-241-0/+1
| | | | | | The old syntax suggested that a trailing comma was OK inside backticks, but in fact (due to ideosyncrasies of pgen) it was not. Fix the grammar to avoid the ambiguity. Fred: you may want to update the refman.
* Very subtle syntax change: in a list comprehension, the testlist inGuido van Rossum2001-10-151-7/+8
| | | | | | | | | | | | | | | "for <var> in <testlist> may no longer be a single test followed by a comma. This solves SF bug #431886. Note that if the testlist contains more than one test, a trailing comma is still allowed, for maximum backward compatibility; but this example is not: [(x, y) for x in range(10), for y in range(10)] ^ The fix involved creating a new nonterminal 'testlist_safe' whose definition doesn't allow the trailing comma if there's only one test: testlist_safe: test [(',' test)+ [',']]
* Merging the gen-branch into the main line, at Guido's direction. Yay!Tim Peters2001-06-181-44/+45
| | | | | Bugfix candidate in inspect.py: it was referencing "self" outside of a method.
* The real suport for augmented assignment: new opcodes, new PyNumber andThomas Wouters2000-08-241-51/+52
| | | | PySequence methods and functions, new tokens.
* Apply SF patch #101135, adding 'import module as m' and 'from module importThomas Wouters2000-08-171-40/+42
| | | | | | | | name as n'. By doing some twists and turns, "as" is not a reserved word. There is a slight change in semantics for 'from module import name' (it will now honour the 'global' keyword) but only in cases that are explicitly undocumented.
* list comprehensions. seeSkip Montanaro2000-08-121-11/+15
| | | | | | http://sourceforge.net/patch/?func=detailpatch&patch_id=100654&group_id=5470 for details.
* Added assert grammar.Guido van Rossum1997-04-021-32/+33
|
* Disable support for access statementGuido van Rossum1996-08-121-35/+33
|
* Changes due to slice and ellipses grammar changesGuido van Rossum1996-07-301-7/+9
|
* changes for ** (power) operatorGuido van Rossum1996-01-121-10/+11
|
* new grammar symbols arglist and argumentGuido van Rossum1995-07-071-0/+2
|
* Changed since Grammar has changedGuido van Rossum1995-01-071-31/+32
|
* * import.c (get_module): pass .py filename to parse_file, not .pyc filename!Guido van Rossum1993-11-301-43/+43
| | | | | | | | | | | * funcobject.c (func_repr): don't call getstringvalue(None) for anonymous functions. * bltinmodule.c: removed lambda (which is now a built-in function); removed implied lambda for string arg to filter/map/reduce. * Grammar, graminit.[ch], compile.[ch]: replaced lambda as built-in function by lambda as grammar entity: instead of "lambda('x: x+1')" you write "lambda x: x+1". * Xtmodule.c (checkargdict): return 0, not NULL, for error.
* * compile.[ch]: support for lambda()Guido van Rossum1993-10-261-2/+2
| | | | | | | | | | * PROTO.h, mymalloc.h: added #ifdefs for TURBOC and GNUC. * allobjects.h: added #include "rangeobject.h" * Grammar: added lambda_input; relaxed syntax for exec. * bltinmodule.c: added bagof, map, reduce, lambda, xrange. * tupleobject.[ch]: added resizetuple(). * rangeobject.[ch]: new object type to speed up range operations (not convinced this is needed!!!)
* * bltinmodule.c: removed exec() built-in function.Guido van Rossum1993-10-181-26/+27
| | | | | | | * Grammar: add exec statement; allow testlist in expr statement. * ceval.c, compile.c, opcode.h: support exec statement; avoid optimizing locals when it is used * fileobject.{c,h}: add getfilename() internal function.
* Several changes in one:Guido van Rossum1993-05-191-28/+28
| | | | | | | | | | | | | | | | (1) dictionaries/mappings now have attributes values() and items() as well as keys(); at the C level, use the new function mappinggetnext() to iterate over a dictionary. (2) "class C(): ..." is now illegal; you must write "class C: ...". (3) Class objects now know their own name (finally!); and minor improvements to the way how classes, functions and methods are represented as strings. (4) Added an "access" statement and semantics. (This is still experimental -- as long as you don't use the keyword 'access' nothing should be changed.)
* *** empty log message ***Guido van Rossum1992-03-241-62/+44
|
* New syntaxGuido van Rossum1991-07-271-32/+35
|
* Added copyright notice.Guido van Rossum1991-02-191-0/+24
|
* removed dir statement. Function arguments may now be tests.Guido van Rossum1990-10-261-30/+29
|
* Initial revisionGuido van Rossum1990-10-141-0/+43