| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
of in a temp variable (bumps the magic number for pyc files)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
would give bogus error messages, because of untested exceptions::
>>> f(**g(1=2))
XXX undetected error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'int' object is not iterable
instead of the expected SyntaxError: keyword can't be an expression
Will backport.
|
|
|
|
| |
ceval.c. This is worth about a .03-.04us speedup on a simple with block.
|
| |
|
|
|
|
|
|
| |
improve error msg
My tests don't show the promised speed up of 10%. The code is as fast as the old code for simple cases and slightly faster for complex cases with several of args and kwargs. But the patch simplifies the code, too.
|
| |
|
| |
|
|
|
|
| |
Suggested by Raymond Hettinger.
|
| |
|
| |
|
|
|
|
| |
Permission for pyc and pyo files are inherited from the py file.
|
| |
|
|
|
|
| |
with some help from Georg
|
|
|
|
| |
because the builtin doesn't need to be ported to py3k, but the tests are missing in py3k and need to be merged there.
|
|
|
|
| |
As far as I know, this only affects Windows. Add float type 'n' to PyOS_ascii_formatd (see PEP 3101 for 'n' description).
|
|
|
|
| |
exception code and reset the overflow condition when handled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Highlights:
- Adding PyObject_Format.
- Adding string.Format class.
- Adding __format__ for str, unicode, int, long, float, datetime.
- Adding builtin format.
- Adding ''.format and u''.format.
- str/unicode fixups for formatters.
The files in Objects/stringlib that implement PEP 3101 (stringdefs.h,
unicodedefs.h, formatter.h, string_format.h) are identical in trunk
and py3k. Any changes from here on should be made to trunk, and
changes will propogate to py3k).
|
| |
|
| |
|
|
|
|
| |
(mistmatch found by clang).
|
|
|
|
| |
there is no need to emit co_lnotab item when both offsets are zeros.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The mapping between bytecode offsets and source lines (lnotab) did not contain
an entry for the beginning of the loop.
Now it does, and the lnotab can be a bit larger:
in particular, several statements on the same line generate several entries.
However, this does not bother the settrace function, which will trigger only
one 'line' event.
The lnotab seems to be exactly the same as with python2.4.
|
|
|
|
|
| |
I implemented the function sys._compact_freelists() and C API functions PyInt_/PyFloat_CompactFreeList() to compact the pre-allocated blocks of ints and floats. They allow the user to reduce the memory usage of a Python process that deals with lots of numbers.
The patch also renames sys._cleartypecache to sys._clear_type_cache
|
| |
|
|
|
|
|
| |
http://mail.python.org/pipermail/python-dev/2008-January/076626.html and issue
1965.
|
|
|
|
|
| |
in the same code unit. The fix is essentially the same as the fix for a
previous bug identifying 0. and -0.
|
|
|
|
| |
Py_Initialize() and Py_Finalize().
|
| |
|
| |
|
|
|
|
| |
string.
|
| |
|
|
|
|
| |
creating an intermediate tuple).
|
|
|
|
| |
PyObject_FromString() to store a python string in a function level static var.
|
|
|
|
| |
leak test runs.
|
| |
|
| |
|
|
|
|
| |
Saves the unnecessary creation of a tuple as intermediate container.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
optimized the
whole construct away, even when an 'else' clause is present::
while 0:
print("no")
else:
print("yes")
did not generate any code at all.
Now the compiler emits the 'else' block, like it already does for 'if' statements.
Will backport.
|
| |
|
|
|
|
| |
The "can't load dll" message box on Windows is suppressed while an extension is loaded by calling SetErrorMode in dynload_win.c. The error is still reported properly.
|
|
|
|
| |
Patch by Angelo Mottola, reviewed by MvL, tests by me.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PyThreadState_Delete() to avoid an infinite loop when the tstate list
is messed up and has somehow becomes circular and does not contain the
current thread.
I don't know how this happens but it does, *very* rarely. On more than
one hardware platform. I have not been able to reproduce it manually.
Attaching to a process where its happening: it has always been in an
infinite loop over a single element tstate list that is not the tstate
we're looking to delete. It has been in t_bootstrap()'s call to
PyThreadState_DeleteCurrent() as a pthread is exiting.
|
|
|
|
| |
function is not called isfinite() but finite(). Sorry, my fault. :)
|
| |
|
|
|
|
|
| |
Fixes the tokenizer, tokenize.py and int() to reject this.
Patches by Malte Helmert.
|
|
|
|
| |
Nikšić.
|
| |
|
|
|
|
|
|
| |
local_ptr_assign_local: Assigning address of stack variable "namebuf" to pointer "filename"
out_of_scope: Variable "namebuf" goes out of scope
use_invalid: Used "filename" pointing to out-of-scope variable "namebuf"
|
| |
|
| |
|