Commit Graph

272 Commits

Author SHA1 Message Date
Guido van Rossum 57531fea90 change syntactical position of lambdef (was an atom, now is a test) 1993-11-30 14:57:42 +00:00
Guido van Rossum 590baa4a7a * import.c (get_module): pass .py filename to parse_file, not .pyc filename!
* 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.
1993-11-30 13:40:46 +00:00
Guido van Rossum 3b716046a0 Committing the correct graminit.c; also changed confusing comments in Grammar. 1993-10-27 13:25:30 +00:00
Guido van Rossum 12d12c5faf * compile.[ch]: support for lambda()
* 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!!!)
1993-10-26 17:58:25 +00:00
Guido van Rossum db3165e655 * bltinmodule.c: removed exec() built-in function.
* 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.
1993-10-18 17:06:59 +00:00
Guido van Rossum b3f7258f14 * Lots of small changes related to access.
* Added "access *: ...", made access work for class methods.
* Introduced subclass check: make sure that when calling
  ClassName.methodname(instance, ...), the instance is an instance of
  ClassName or of a subclass thereof (this might break some old code!)
1993-05-21 19:56:10 +00:00
Guido van Rossum 25831652fd Several changes in one:
(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.)
1993-05-19 14:50:45 +00:00
Guido van Rossum cf49ac55ac Added missing change log entries 1992-04-06 14:39:51 +00:00
Guido van Rossum 02334d2be0 Use only '*' for varargs list 1992-04-06 12:36:19 +00:00
Guido van Rossum af82141bb6 Tighten syntax for try statements 1992-03-31 18:49:18 +00:00
Guido van Rossum e785fbcfa7 Allow NEWLINE* after eval input. 1992-03-04 16:41:24 +00:00
Guido van Rossum 610cdc52ca Add '*' for varargs list. 1992-01-26 18:17:23 +00:00
Guido van Rossum 526e909614 Added varargs syntax "def f(a, b, +c): ..." 1992-01-14 18:27:17 +00:00
Guido van Rossum 09cea47433 Don't allow '==' at top level yet, to catch conversion errors. 1992-01-01 14:51:57 +00:00
Guido van Rossum 6cf1273faa Allow trailing comma after fplist; '=' is no longer comparison;
expr/assignment statement now allows testlists.
1991-12-31 13:11:56 +00:00
Guido van Rossum 68fc349744 Added 'global' and new class syntax. 1991-12-10 13:51:08 +00:00
Guido van Rossum 9eb4f535aa Added shifting and masking operators. 1991-10-24 14:54:25 +00:00
Guido van Rossum a76fb5b653 Comparison operators '<=' '>' '<>' are now 1 token.
Also support '!=' and '==' as alternatives for '<>' and '='.
1991-10-20 20:10:09 +00:00
Guido van Rossum 7ac4a88721 Change treatment of multiple NEWLINES 1991-07-27 21:29:47 +00:00
Guido van Rossum 56f7837704 Added 'continue', semicolons and dictionary displays. 1991-07-17 18:39:15 +00:00
Guido van Rossum 4dae216784 Removed 'dir' statement.
Function call argument is a testlist instead of exprlist.
1991-01-21 15:07:21 +00:00
Guido van Rossum 85a5fbbdfe Initial revision 1990-10-14 12:07:46 +00:00