Commit Graph

35 Commits

Author SHA1 Message Date
Guido van Rossum
8054fad890 Changes to accept double-quoted strings on input. 1993-10-26 15:19:44 +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
f1dc566328 * Makefile: added all: and default: targets.
* many files: made some functions static; removed "extern int errno;".
* frozenmain.c: fixed bugs introduced on 24 June...
* flmodule.c: remove 1.5 bw compat hacks, add new functions in 2.2a
  (and some old functions that were omitted).
* timemodule.c: added MSDOS floatsleep version .
* pgenmain.c: changed exit() to goaway() and added defn of goaway().
* intrcheck.c: add hack (to UNIX only) so interrupting 3 times
  will exit from a hanging program.  The second interrupt prints
  a message explaining this to the user.
1993-07-05 10:31:29 +00:00
Guido van Rossum
81daa32c15 Access checks now work, at least for instance data (not for methods
yet).  The class is now passed to eval_code and stored in the current
frame.  It is also stored in instance method objects.  An "unbound"
instance method is now returned when a function is retrieved through
"classname.funcname", which when called passes the class to eval_code.
1993-05-20 14:24:46 +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
8b17d6bd89 Changes to speed up local variables enormously, by avoiding dictionary
lookup (opcode.h, ceval.[ch], compile.c, frameobject.[ch],
pythonrun.c, import.c).  The .pyc MAGIC number is changed again.
Added get_menu_text to flmodule.
1993-03-30 13:18:41 +00:00
Guido van Rossum
9bfef44d97 * Changed all copyright messages to include 1993.
* Stubs for faster implementation of local variables (not yet finished)
* Added function name to code object.  Print it for code and function
  objects.  THIS MAKES THE .PYC FILE FORMAT INCOMPATIBLE (the version
  number has changed accordingly)
* Print address of self for built-in methods
* New internal functions getattro and setattro (getattr/setattr with
  string object arg)
* Replaced "dictobject" with more powerful "mappingobject"
* New per-type functio tp_hash to implement arbitrary object hashing,
  and hashobject() to interface to it
* Added built-in functions hash(v) and hasattr(v, 'name')
* classobject: made some functions static that accidentally weren't;
  added __hash__ special instance method to implement hash()
* Added proper comparison for built-in methods and functions
1993-03-29 10:43:31 +00:00
Guido van Rossum
2dff991f6b Give code objects a more useful representation. 1992-09-03 20:50:59 +00:00
Guido van Rossum
94fb82e461 Only * can be used for varargs argument lists 1992-04-05 14:24:50 +00:00
Guido van Rossum
f1aeab7f81 fix what lint found 1992-03-27 17:28:26 +00:00
Guido van Rossum
56a1bcc107 Totally get rid of silly '\E' escape. 1992-03-12 17:36:11 +00:00
Guido van Rossum
598fd8c980 Raise SyntaxError for syntax errors detected in this phase. 1992-01-26 18:12:03 +00:00
Guido van Rossum
acbefefe21 Use strtoul() for oct/hex constants.
Accept * as well as + in varargs arg list.
1992-01-19 16:33:51 +00:00
Guido van Rossum
49d6dc4123 Added varargs code. 1992-01-14 18:30:26 +00:00
Guido van Rossum
39d942da0f add READONLY to member list. 1992-01-12 02:30:05 +00:00
Guido van Rossum
a9df32ab2a Minor changes. 1991-12-31 13:13:35 +00:00
Guido van Rossum
efb087b13f Changed some RuntimeErrors. 1991-12-16 15:41:41 +00:00
Guido van Rossum
288a60f973 New argument passing. 1991-12-16 13:05:10 +00:00
Guido van Rossum
c5e96291d0 Implement 'global' and new class syntax. 1991-12-10 13:53:51 +00:00
Guido van Rossum
7928cd7636 Added shift and mask ops. 1991-10-24 14:59:31 +00:00
Guido van Rossum
01cfd447d0 Comment out 'abort()' call.
Changed comparison operators.
1991-10-20 20:12:38 +00:00
Guido van Rossum
831632507a Use dmore dict2lookup. 1991-08-16 08:58:43 +00:00
Guido van Rossum
4bad92cc8a New syntax: semicolons, continue statement.
For the latter we must keep track of the current block's type.
(We can't continue through a try statement, sigh.()
1991-07-27 21:34:52 +00:00
Guido van Rossum
efc0bd02e5 Check for identical types before comparing objects to see if they
are the same -- 0 and 0.0 compare equal but should be considered different
here!
1991-07-01 18:44:20 +00:00
Guido van Rossum
a082ce40a6 Changed and exported newcodeobject() interface, for ".pyc" files. 1991-06-04 19:41:56 +00:00