Martin v. Löwis
03e5bc02c9
Fix memory leak on attributes.
2006-03-02 00:31:27 +00:00
Thomas Wouters
695934a0ef
Make Py_ssize_t clean.
2006-03-01 23:49:13 +00:00
Martin v. Löwis
49c5da1d88
Patch #1440601 : Add col_offset attribute to AST nodes.
2006-03-01 22:49:05 +00:00
Thomas Wouters
7464b43e41
Fix incompatible assignment warning from previous checkin.
2006-03-01 22:34:09 +00:00
Thomas Wouters
7f401ef73d
Fix gcc (4.0.x) warning about use of uninitialized variables.
...
(PyMarshal_ReadShortFromFile() is only used in zipimport.c, I don't believe
the extra initializations will matter one way or another.)
2006-03-01 22:30:47 +00:00
Brett Cannon
54ac29497e
Document PEP 352 changes. Also added GeneratorExit.
2006-03-01 22:10:49 +00:00
Thomas Wouters
65b3dab50e
Fix uninitialized value. (Why are we using bools instead of ints, like we do
...
everywhere else?)
2006-03-01 22:06:23 +00:00
Martin v. Löwis
0b300be895
Fix more memory leaks. Will backport to 2.4.
2006-03-01 21:33:54 +00:00
Thomas Wouters
c3547a311e
Fix C99-ism, and add XXX to comment
2006-03-01 21:31:21 +00:00
Martin v. Löwis
056a69cba6
Reconst parameters that lost their const in the AST merge.
2006-03-01 16:55:42 +00:00
Jeremy Hylton
e9357b21c0
Tabify and reflow some long lines.
...
Much of the peephole optimizer is now indented badly, but it's about
to be revised anyway.
2006-03-01 15:47:05 +00:00
Jeremy Hylton
224003baef
Add missing DECREF.
2006-03-01 15:02:24 +00:00
Thomas Wouters
572a9f32dc
Use %zd format characters for Py_ssize_t types.
2006-03-01 05:38:39 +00:00
Thomas Wouters
7f59732716
Put back the essence of Jeremy's original XXX comment.
2006-03-01 05:32:33 +00:00
Brett Cannon
bf36409e2a
PEP 352 implementation. Creates a new base class, BaseException, which has an
...
added message attribute compared to the previous version of Exception. It is
also a new-style class, making all exceptions now new-style. KeyboardInterrupt
and SystemExit inherit from BaseException directly. String exceptions now
raise DeprecationWarning.
Applies patch 1104669, and closes bugs 1012952 and 518846.
2006-03-01 04:25:17 +00:00
Martin v. Löwis
762467475d
Use Py_ssize_t for PyArg_UnpackTuple arguments.
2006-03-01 04:06:10 +00:00
Neal Norwitz
53d960c010
Don't pollute namespace as bad as before. All the types are static now.
2006-02-28 22:47:29 +00:00
Thomas Wouters
8ae1295c5b
Make 'as' an actual keyword when with's future statement is used. Not
...
actually necessary for functionality, but good for transition.
2006-02-28 22:42:15 +00:00
Neal Norwitz
090b3dde06
No need to export PySTEntry_New, it is only used in symtable.c
2006-02-28 22:36:46 +00:00
Guido van Rossum
1a5e21e033
Updates to the with-statement:
...
- New semantics for __exit__() -- it must re-raise the exception
if type is not None; the with-statement itself doesn't do this.
(See the updated PEP for motivation.)
- Added context managers to:
- file
- thread.LockType
- threading.{Lock,RLock,Condition,Semaphore,BoundedSemaphore}
- decimal.Context
- Added contextlib.py, which defines @contextmanager, nested(), closing().
- Unit tests all around; bot no docs yet.
2006-02-28 21:57:43 +00:00
Thomas Wouters
5e9f1fa706
Generally inehrit codeflags that are in PyCF_MASK, instead of writing it out
...
in multiple places. This makes compile()/eval()/etc also inherit the
absolute-import codeflag, like division and with-statement already were.
2006-02-28 20:02:27 +00:00
Jeremy Hylton
56820c2bab
Add some stats collection in debugging mode.
...
No good way to extract output yet.
2006-02-28 19:57:06 +00:00
Thomas Wouters
34aa7ba114
from __future__ import with_statement addon for 'with', mostly written by
...
Neal.
2006-02-28 19:02:24 +00:00
Jeremy Hylton
99b4ee6373
Use simple PyList to implement list of PyObject pointers
2006-02-28 18:52:28 +00:00
Jeremy Hylton
08533fdad6
Tabify
2006-02-28 18:29:00 +00:00