| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
object and structmodule. But, these need to be finished in Python 3.0 first. No objects support the new buffer API in Python 2.6 as of yet, and except for the memoryview object, I don't think they will.
|
|
|
|
| |
derive from BaseException.
|
|
|
|
| |
standard library.
|
|
|
|
|
| |
now don't warn for some corner cases that deserve a warning, rather
than warning double or incorrectly for some other corner cases.
|
|
|
|
| |
doesn't derive from BaseException.
|
|
|
|
|
|
|
|
| |
Added 0b and 0o literals to tokenizer.
Modified PyOS_strtoul to support 0b and 0o inputs.
Modified PyLong_FromString to support guessing 0b and 0o inputs.
Renamed test_hexoct.py to test_int_literal.py and added binary tests.
Added upper and lower case 0b, 0O, and 0X tests to test_int_literal.py
|
|
|
|
| |
Deleted unused macro ISXDIGIT.
|
|
|
|
|
|
|
|
|
| |
past the decimal point.
Added "Z" format_char to PyOS_ascii_formatd to support empty float presentation type.
Renamed buf_size in PyOS_ascii_formatd to more accurately reflect it's meaning.
Modified format.__float__ to use the new "Z" format as the default.
Added test cases.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
assert (0, 'message')
An empty tuple does not create a warning. While questionable usage:
assert (), 'message'
should not display a warning. Tested manually.
The warning message could be improved. Feel free to update it.
|
|
|
|
| |
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.
|