| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Added an extra blank line before "What's New in Python 2.2 final?".
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
instead of a plain PyObject *. (SF patch #686601 by Ben Laurie.)
|
|
|
|
|
| |
turned into an absolute pathname, unless it is the empty string.
(SF patch #664376, by Skip Montanaro.)
|
| |
|
|
|
|
| |
now have tp_as_number. Check for nb_int or nb_float.
|
|
|
|
| |
at least, what I thought the intent was).
|
|
|
|
|
| |
move definition of platform dependent path related variables from os.py
to platform dependent path modules (ntpath, etc).
|
| |
|
|
|
|
|
|
|
| |
test_linuxaudiodev.py) are no longer run by default. This is
because they don't always work, depending on your hardware and
software. To run these tests, you must use an invocation like
./python Lib/test/regrtest.py -u audio test_ossaudiodev
|
| |
|
|
|
|
|
|
|
|
|
| |
with an indented code block but no newline would raise SyntaxError.
This would have been a four-line change in parsetok.c... Except
codeop.py depends on this behavior, so a compilation flag had to be
invented that causes the tokenizer to revert to the old behavior;
this required extra changes to 2 .h files, 2 .c files, and 2 .py
files. (Fixes SF bug #501622.)
|
|
|
|
|
|
|
| |
This changes the default __new__ to refuse arguments iff tp_init is the
default __init__ implementation -- thus making it a TypeError when you
try to pass arguments to a constructor if the class doesn't override at
least __init__ or __new__.
|
|
|
|
|
|
|
|
| |
mostly from SF patch #683257, but I had to change unlock_import() to
return an error value to avoid fatal error.
Should this be backported? The patch requested this, but it's a new
feature.
|
|
|
|
|
|
|
|
| |
folded; this will change in Python 2.4. On a 32-bit machine, this
happens for 0x80000000 through 0xffffffff, and for octal constants in
the same value range. No warning is issued if an explicit base is
given, *or* if the string contains a sign (since in those cases no
sign folding ever happens).
|
|
|
|
|
|
|
|
|
|
| |
"Unsigned" (i.e., positive-looking, but really negative) hex/oct
constants with a leading minus sign are once again properly negated.
The micro-optimization for negated numeric constants did the wrong
thing for such hex/oct constants. The patch avoids the optimization
for all hex/oct constants.
This needs to be backported to Python 2.2!
|
|
|
|
| |
now be a proxy for an X instance, as long as issubclass(x.__class__, X).
|
|
|
|
|
| |
instance, as long as x.__class__ is X or a subclass thereof.
Did a little cleanup of PyObject_IsInstance() too.
|
|
|
|
| |
types -- Python types already inherited this.
|
| |
|
| |
|
|
|
|
|
|
| |
When subclassing from an int but not overriding __new__,
long values were not converted properly. Try to convert
longs into an int.
|
| |
|
|
|
|
| |
Add Grant Olson for patch provided to fix bug #678518
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__ne__ no longer complain if they don't know how to compare to the other
thing. If no meaningful way to compare is known, saying "not equal" is
sensible. This allows things like
if adatetime in some_sequence:
and
somedict[adatetime] = whatever
to work as expected even if some_sequence contains non-datetime objects,
or somedict non-datetime keys, because they only call __eq__.
It still complains (raises TypeError) for mixed-type comparisons in
contexts that require a total ordering, such as list.sort(), use as a
key in a BTree-based data structure, and cmp().
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-DCALL_PROFILE: Count the number of function calls executed.
When this symbol is defined, the ceval mainloop and helper functions
count the number of function calls made. It keeps detailed statistics
about what kind of object was called and whether the call hit any of
the special fast paths in the code.
Optimization:
When we take the fast_function() path, which seems to be taken for
most function calls, and there is minimal frame setup to do, avoid
call PyEval_EvalCodeEx(). The eval code ex function does a lot of
work to handle keywords args and star args, free variables,
generators, etc. The inlined version simply allocates the frame and
copies the arguments values into the frame.
The optimization gets a little help from compile.c which adds a
CO_NOFREE flag to code objects that don't have free variables or cell
variables. This change allows fast_function() to get into the fast
path with fewer tests.
I measure a couple of percent speedup in pystone with this change, but
there's surely more that can be done.
|
|
|
|
|
| |
Added array.array to the types repr.py knows about, after a suggestion
from Jurjen N.E. Bos.
|
|
|
|
| |
instead of raising a TypeError. Closes #660144 (again).
|
| |
|
|
|
|
|
|
|
|
| |
extension implemented flush() was fixed. Scott also rewrite the
zlib test suite using the unittest module. (SF bug #640230 and
patch #678531.)
Backport candidate I think.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
power of 2. Enabled the tail end of test_long() in pickletester.py
because it no longer takes forever when run from test_pickle.py.
|
|
|
|
|
|
| |
anymore either, so don't. This also allows to get rid of obscure code
making __getnewargs__ identical to __getstate__ (hmm ... hope there
wasn't more to this than I realize!).
|
| |
|
|
|
|
|
|
|
|
| |
(pickling no longer needs them, and immutable objects shouldn't have
visible __setstate__() methods regardless). Rearranged the code to
put the internal setstate functions in the constructor sections.
Repaired the timedelta reduce() method, which was still producing
stuff that required a public timedelta.__setstate__() when unpickling.
|
| |
|
|
|
|
| |
Check return value of PyLong_AsDouble(), it can return an error.
|
|
|
|
| |
(SF patch #675750, to fix SF bug #675552.)
|
|
|
|
|
| |
this over the weekend, and it made faster & better progress than I
expected -- it's already useful <wink>.
|
|
|
|
| |
of the usual frantic editing at the last moment:-)
|
| |
|