summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Improve stack depth computation for try/except and try/finallyJeremy Hylton2001-08-292-2/+8
| | | | Add CONTINUE_LOOP to the list of unconditional transfers
* Add __getitem__() handler for use by visitContinue()Jeremy Hylton2001-08-292-0/+4
|
* Added xx and xxsubtype modules, for completeness and because xxsubtype is ↵Jack Jansen2001-08-292-0/+7
| | | | used by the test suite.
* Started on release notes and readme for 2.2a2.Jack Jansen2001-08-292-52/+113
|
* SF bug [#456252] Python should never stomp on [u]intptr_t.Tim Peters2001-08-296-17/+22
| | | | | | | | | | | pyport.h: typedef a new Py_intptr_t type. DELICATE ASSUMPTION: That HAVE_UINTPTR_T implies intptr_t is available as well as uintptr_t. If that turns out not to be true, things must get uglier (C99 wants both, so I think it's an assumption we're *likely* to get away with). thread_nt.h, PyThread_start_new_thread: MS _beginthread is documented as returning unsigned long; no idea why uintptr_t was being used. Others: Always use Py_[u]intptr_t, never [u]intptr_t directly.
* Generate SET_LINENO for list and tuple literals when the open parenJeremy Hylton2001-08-292-2/+6
| | | | | | | starts a new line. Also fix undetected typo in visitDict() -- uncovered by recent change to add lineno attrs to atoms.
* Make sure that atoms (Tuple, List, etc.) have lineno attributesJeremy Hylton2001-08-292-4/+8
|
* Fix off-by-one errors in code to find depth of stack.Jeremy Hylton2001-08-292-6/+6
| | | | | XXX The code is still widely inaccurate, but most (all?) of the time it's an overestimate.
* Workaround by Tim Peters to skip this test if run from test.autotest,Jack Jansen2001-08-291-1/+5
| | | | | in which case it will hang because the import lock is already held by the main thread.
* Undo change from list to dict for handling varnames, consts, etc.Jeremy Hylton2001-08-292-98/+44
| | | | | | | | | | As the doc string for _lookupName() explains: This routine uses a list instead of a dictionary, because a dictionary can't store two different keys if the keys have the same value but different types, e.g. 2 and 2L. The compiler must treat these two separately, so it does an explicit type comparison before comparing the values.
* Change default() to use getChildNodes() instead of getChildren()Jeremy Hylton2001-08-292-6/+4
|
* Support // and //=Jeremy Hylton2001-08-292-2/+12
| | | | | | | Generate SET_LINENO for del statements. Define klass=1 for PyFlowGraph constructor for a class statement. A class has no varnames.
* Add support for // and //=.Jeremy Hylton2001-08-292-10/+32
| | | | | | | | Avoid if/elif/elif/else tests where the final else is supposed to handle exactly one case instead of all other cases. When the list of operators is extended, the catchall else treats all new operators as the last operator in the set of tests. Instead, raise an exception if an unexpected operator occurs.
* Add generator detection to symbol table.Jeremy Hylton2001-08-292-18/+70
| | | | | Fix bug in handling of statements like "l[x:y] = 2". The visitor was treating this as assignments to l, x, and y!
* Modify name conversion to be (hopefully) a bit more efficient.Jeremy Hylton2001-08-292-34/+104
| | | | | | | | Use a dictionary instead of a list to map objects to their offsets in a const/name tuple of a code object. XXX The conversion is perhaps incomplete, in that we shouldn't have to do the list2dict to start.
* Revise implementations of getChildren() and getChildNodes().Jeremy Hylton2001-08-296-318/+1528
| | | | | | | | | | | | | | | | Add support for floor division (// and //=) The implementation of getChildren() and getChildNodes() is intended to be faster, because it avoids calling flatten() on every return value. But it's not clear that it is a lot faster, because constructing a tuple with just the right values ends up being slow. (Too many attribute lookups probably.) The ast.txt file is much more complicated, with funny characters at the ends of names (*, &, !) to indicate the types of each child node. The astgen script is also much more complex, making me wonder if it's still useful.
* Add opcodes for floor division and true division (PEP 238)Jeremy Hylton2001-08-291-0/+4
|
* Add tests for augmented floor divisionJeremy Hylton2001-08-292-0/+27
|
* Don't include doc string of class in its code childJeremy Hylton2001-08-292-0/+10
|
* Now that int is subclassable, have to change a test that tests forGuido van Rossum2001-08-291-2/+2
| | | | non-subclassability. (More tests for number subclassing should follow.)
* Make int, long and float subclassable.Guido van Rossum2001-08-293-14/+111
| | | | This uses a slightly wimpy and wasteful approach, but it works. :-)
* Fix super() so that it is usable for static methods (like __new__) as well.Guido van Rossum2001-08-291-8/+27
| | | | | In particular, the second argument can now be a subclass of the first as well (normally it must be an instance though).
* Make the PyXXX_Check() macros for the numeric types inheritance-aware.Guido van Rossum2001-08-294-4/+4
|
* GUSI on the Mac creates threads with a default stack size of 20KB, which isJack Jansen2001-08-291-1/+21
| | | | | not enough for Python. Increased the stacksize to a (somewhat arbitrary) 64KB.
* Fix a minor markup typo.Fred Drake2001-08-291-1/+1
|
* marshal.c r_long64: When reading a TYPE_INT64 value on a box with 32-bitTim Peters2001-08-293-12/+70
| | | | ints, convert to PyLong (rather than throwing away the high-order 32 bits).
* On Fred's suggestion, convert sprintf() examples to useBarry Warsaw2001-08-291-19/+11
| | | | | PyString_FromFormat(). Also fixed one grammar problem, and a few other mark-up issues. Sample code not checked.
* Add METH_O and METH_NOARGS changeAndrew M. Kuchling2001-08-291-9/+19
| | | | | Rewrite snprintf() item a bit Bump version number
* pickle.py, load_int(): Match cPickle's just-repaired ability to unpickleTim Peters2001-08-282-1/+20
| | | | | | | | 64-bit INTs on 32-bit boxes (where they become longs). Also exploit that int(str) and long(str) will ignore a trailing newline (saves creating a new string at the Python level). pickletester.py: Simulate reading a pickle produced by a 64-bit box.
* load_int: The fallback to long ints was coded in such a way that itTim Peters2001-08-281-4/+3
| | | | couldn't succeed. Fixed.
* Update an email address.Barry Warsaw2001-08-281-10/+10
|
* Note change in fp literal syntax (e.g. "3e-" worked by accident before).Tim Peters2001-08-281-0/+3
|
* Fix a typo in SLOT0 macro for the declaration of cache_str.Guido van Rossum2001-08-281-1/+1
| | | | Dunno why I didn't catch this before.
* Fix the test again due to fewer calls to __getattr__.Guido van Rossum2001-08-281-3/+1
|
* Finish the previous checkin: also avoid getattr when calling the methodGuido van Rossum2001-08-281-25/+93
| | | | directly.
* Revise comments about TeX & LaTeX for accuracy.Fred Drake2001-08-281-5/+7
| | | | This closes SF bug #456222.
* Fix one test to reflect the change in method lookup policy.Guido van Rossum2001-08-281-2/+1
|
* Change in policy: when a slot_tp_xxx function looks for the __xxx__ method,Guido van Rossum2001-08-281-15/+57
| | | | | | | | | don't use getattr, but only look in the dict of the type and base types. This prevents picking up all sorts of weird stuff, including things defined by the metaclass when the object is a class (type). For this purpose, a helper function lookup_method() was added. One or two other places also use this.
* Make sure the JUMP_ABSOLUTE and POP_BLOCK at the end of a for loop areJeremy Hylton2001-08-282-2/+2
| | | | contiguous.
* The "O!" format code should implement an isinstance() testGuido van Rossum2001-08-281-1/+1
| | | | rather than a type equality test.
* XXX_NAME ops should affect varnamesJeremy Hylton2001-08-282-2/+8
| | | | | | varnames should list all the local variables (with arguments first). The XXX_NAME ops typically occur at the module level and assignment ops should create locals.
* Generate FOR_ITER-based loops instead of old FOR_LOOP-based loopsJeremy Hylton2001-08-282-10/+18
|
* FOR_ITER is a jrel_op() not a plain old def_op()Jeremy Hylton2001-08-281-1/+1
|
* Added explanation that [...] * n generates shallow copies of [...], soFred Drake2001-08-281-2/+26
| | | | | | the contents will be shared by multiple references. This closes SF bug #455694.
* Added list of tests expected to be skipped on the mac.Jack Jansen2001-08-281-0/+36
|
* Fix a number of minor markup errors, and improve the consistency a bit.Fred Drake2001-08-281-16/+16
|
* Plant a mention in the description of backreferences of the fact thatEric S. Raymond2001-08-281-1/+5
| | | | while \0 doesn't do what one might expect, \g<0> does.
* Refcount info for PyString_FromFormat() and PyString_FromFormatV().Barry Warsaw2001-08-281-0/+8
| | | | Closes SF patch #455666.
* Documentation for PyString_FromFormat() and PyString_FromFormatV().Barry Warsaw2001-08-281-0/+28
| | | | Closes SF patch #455666.
* Experimental feature: allow \n as well as \r as newline for text files, by ↵Jack Jansen2001-08-271-0/+17
| | | | breaking in to the lowlevel I/O system. Can be disabled by defining WITHOUT_UNIX_NEWLINES.