| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
imports by calling __import__ with an explicit level of 0
Added a new API function PyImport_ImportModuleNoBlock. It solves the problem with dead locks when mixing threads and imports
|
|
|
|
|
|
|
| |
the complex_pow part), r56649, r56652, r56715, r57296, r57302, r57359, r57361,
r57372, r57738, r57739, r58017, r58039, r58040, and r59390, and new
documentation. The only significant difference is that round(x) returns a float
to preserve backward-compatibility. See http://bugs.python.org/issue1689.
|
| |
|
| |
|
|
|
|
|
|
| |
This changes the rules for when __hash__ is inherited slightly,
by allowing it to be inherited when one or more of __lt__, __le__,
__gt__, __ge__ are overridden, as long as __eq__ and __ne__ aren't.
|
|
|
|
| |
Py_REFCNT. Macros for b/w compatibility are available.
|
|
|
|
|
|
| |
platforms).
The patch unifies float("inf") and repr(float("inf")) on all platforms.
|
|
|
|
|
|
|
|
|
|
|
| |
Allows dictionaries to be pre-sized (upto 255 elements) saving time lost
to re-sizes with their attendant mallocs and re-insertions.
Has zero effect on small dictionaries (5 elements or fewer), a slight
benefit for dicts upto 22 elements (because they had to resize once
anyway), and more benefit for dicts upto 255 elements (saving multiple
resizes during the build-up and reducing the number of collisions on
the first insertions). Beyond 255 elements, there is no addional benefit.
|
|
|
|
|
|
| |
pointer copy and object increment in one pass. For small lists,
save the overhead of the call to memcpy() -- this comes up in
calls like f(*listcomp).
|
|
|
|
|
|
| |
place.
I added also the feature that a @prop.getter decorator does not overwrite the doc string of the property if it was given as an argument to property().
|
|
|
|
|
|
|
| |
feature until we have sorted out the issues on all machines. 64bit machines seem to have issues and Guido has reported even worse.
Guido: It's pretty bad actually -- repr(1e5) comes out as '1.0'... Ditto for
repr(1eN) for most N... Both in 2.6 and in 3.0...
|
|
|
|
|
|
| |
Issue #1580: New free format floating point representation based on "Floating-Point Printer Sample Code", by Robert G. Burger. For example repr(11./5) now returns '2.2' instead of '2.2000000000000002'.
Thanks to noam for the patch! I had to modify doubledigits.c slightly to support X64 and IA64 machines on Windows. I also added the new file to the three project files.
|
|
|
|
| |
anything (issue 1538).
|
| |
|
|
|
|
|
| |
Factor-out common calling code by simplifying the length_hint API.
Speed-up the function by caching the PyObject_String for the attribute lookup.
|
|
|
|
| |
can make list() raise a SystemError
|
| |
|
|
|
|
|
| |
Change GeneratorExit's base class from Exception to BaseException
(This time I'm applying the patch to the correct sandbox.)
|
| |
|
|
|
|
|
| |
Added PyFloat_GetMax(), PyFloat_GetMin() and PyFloat_GetInfo() to the float API.
Added a dictionary sys.float_info with information about the internal floating point type to the sys module.
|
| |
|
| |
|
|
|
|
|
| |
the imaginary part (as long as it's not complex).
Backport candidate?
|
|
|
|
| |
attribute of an empty cell object. Now a ValueError is raised.
|
|
|
|
|
| |
I've finished the last task for the PCbuild9 directory today. I don't think there is much left to do. Now you can all play around with the shiny new VS 2008 and try the PGO builds. I was able to get a speed improvement of about 10% on py3k.
Have fun! :)
|
|
|
|
| |
With some changes of my own thrown in (e.g. backport of r58107).
|
|
|
|
|
|
|
| |
Solves issue1460.
Might not be a backport candidate: a new API function was added,
and some code may rely on details in utf-7.py.
|
| |
|
|
|
|
| |
cycle before the tests...). Sorry.
|
|
|
|
|
|
|
|
|
|
|
|
| |
as usual with slicing (both with str and unicode strings). This
fixes issue 1259.
For str only the stringobject.c file was modified. But for unicode,
I needed to repeat in the four functions a lot of code, so created
a new function that does part of the job for them (and placed it in
find.h, following a suggestion of Barry).
Also added tests for this behaviour.
|
| |
|
|
|
|
| |
Guido prefers _x over __x.
|
|
|
|
| |
used as decorators to create fully-populated properties.
|
| |
|
| |
|
| |
|
|
|
|
| |
counts for example.
|
| |
|
|
|
|
|
|
|
| |
also hex escapes) -- this was reaching beyond the end of the input string
buffer, even though it is not supposed to be \0-terminated.
This has no visible effect but is clearly the correct thing to do.
(In 3.0 it had a visible effect after removing ob_sstate from PyString.)
|
|
|
|
|
|
| |
Introduce overflow checking into list_inplace_repeat.
Backport candidate, possibly.
|
|
|
|
|
|
| |
Just move over to the public API names.
Closes issue1238.
|
|
|
|
| |
All this code already exists above starting at line 653.
|
|
|
|
| |
The possibility of overflow was sending some newsgroup posters into a tizzy.
|
|
|
|
| |
don't worry about any self-referring tuples.
|
|
|
|
|
|
|
|
|
|
| |
Python code; but it is possible from C. object.__str__ had the issue of not
expecting a type to doing something within it's tp_str implementation that
could trigger an infinite recursion, but it could in C code.. Both found
thanks to BaseException and how it handles its repr.
Closes issue #1686386. Thanks to Thomas Herve for taking an initial stab at
coming up with a solution.
|
|
|
|
|
| |
Make tell() mark CRLF as a newline.
With unit test.
|
|
|
|
|
|
|
| |
predictable to being completely predictable. The value of hash(n)
is unchanged for any n that's small enough to be representable as an
int, and also unchanged for the vast majority of long integers n of
reasonable size.
|
|
|
|
| |
py3k branch ;)
|
|
|
|
|
|
| |
PyObject_Print().
Closes issue #1164.
|