| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
no-no.
Fixes issue #1147. Need to fix 2.5 to raise a proper warning if a string
exception is passed in.
|
|
|
|
|
|
|
|
| |
Backport abc.py and isinstance/issubclass overloading to 2.6.
I had to backport test_typechecks.py myself, and make one small change
to abc.py to avoid duplicate work when x.__class__ and type(x) are the
same.
|
|
|
|
| |
Closes issue #1096.
|
|
|
|
|
|
|
| |
ever going back out to Python code in PyObject_Call(). Required introducing a
static RuntimeError instance so that normalizing an exception there is no
reliance on a recursive call that would put the exception system over the
recursion check itself.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Specialcase extended slices that amount to a shallow copy the same way as
is done for simple slices, in the tuple, string and unicode case.
- Specialcase step-1 extended slices to optimize the common case for all
involved types.
- For lists, allow extended slice assignment of differing lengths as long
as the step is 1. (Previously, 'l[:2:1] = []' failed even though
'l[:2] = []' and 'l[:2:None] = []' do not.)
- Implement extended slicing for buffer, array, structseq, mmap and
UserString.UserString.
- Implement slice-object support (but not non-step-1 slice assignment) for
UserString.MutableString.
- Add tests for all new functionality.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
(backport)
|
|
|
|
|
| |
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
|
|
|
|
| |
with %G.
|