| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
Py_Initialize() and Py_Finalize().
|
| | |
|
| |
|
|
| |
detection. The speedup is about 25% for split() (571 / 457 usec) and 35% (175 / 127 usec )for splitlines()
|
| | |
|
| |
|
|
|
| |
Works like PyTuple_SetItem() to build-up values in a brand new frozenset.
Also, PyFrozenSet_New() is now guaranteed to produce a distinct new frozenset.
|
| |
|
|
| |
PyObject_FromString() to store a python string in a function level static var.
|
| |
|
|
| |
leak test runs.
|
| |
|
|
|
|
|
| |
it's useful outside of rational numbers.
This is my first C code that had to do anything significant. Please be more
careful when looking over it.
|
| | |
|
| |
|
|
| |
the original code object backing the generator. Patch by Collin Winter.
|
| | |
|
| | |
|
| |
|
|
| |
build-up values in a brand new frozenset.
|
| | |
|
| | |
|
| |
|
|
| |
it was released, but that reversion never made it to the Py2.6 head.
|
| |
|
|
|
|
|
| |
PyUnicode_FromString, PyUnicode_Format and PyLong_From/AsSsize_t. The functions are partly required for the backport of the bytearray type and _fileio module. They should also make it easier to port C to 3.0.
First chapter of the Python 3.0 io framework back port: _fileio
The next step depends on a working bytearray type which itself depends on a backport of the nwe buffer API.
|
| |
|
|
|
| |
and eliminate a compiler warning in floatobject.c. There might be
a better way to go about this, but it should be good enough for now.
|
| | |
|
| | |
|
| |
|
|
| |
create a new weakref to the object.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
or isinstance(t, tuple).
Orignal patch (without tests) by Leif Walsh.
|
| |
|
|
| |
of Neal's suggestions.
|
| |
|
|
|
|
| |
sys.float_info to a structseq. It's
readonly and help(sys.float_info) explains the attributes nicely.
|
| | |
|
| |
|
|
|
|
| |
now that ctypes uses a more supported method to create types:
Method cache optimization, by Armin Rigo, ported to 2.6 by Kevin Jacobs.
|
| | |
|
| |
|
|
| |
2.6 by Kevin Jacobs.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
round included:
* Revert round to its 2.6 behavior (half away from 0).
* Because round, floor, and ceil always return float again, it's no
longer necessary to have them delegate to __xxx___, so I've ripped
that out of their implementations and the Real ABC. This also helps
in implementing types that work in both 2.6 and 3.0: you return int
from the __xxx__ methods, and let it get enabled by the version
upgrade.
* Make pow(-1, .5) raise a ValueError again.
|
| |
|
|
| |
compatibility after r59671 made them return integral types.
|
| | |
|
| |
|
|
|
|
| |
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.
|