summaryrefslogtreecommitdiffstats
path: root/Include/graminit.h
Commit message (Collapse)AuthorAgeFilesLines
* 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