to test the new setparameters() interface.
Modified play_sound_file() to print the elapsed time taken to play the
test sample (to the nearest 0.1 sec).
Python-Dev. Fixed typos in test comments. Added some trivial new test
guts to show the parallelism (now) among __delitem__, __setitem__ and
__getitem__ wrt error conditions.
Still a bugfix candidate for 2.2.3 final, but waiting for Fred to get a
chance to chime in.
Someone review this, please! Final releases are getting close, Fred
(the weakref guy) won't be around until Tuesday, and the pre-patch
code can indeed raise spurious RuntimeErrors in the presence of
threads or mutating comparison functions.
See the bug report for my confusions: I can't see any reason for why
__delitem__ iterated over the keys. The new one-liner implementation
is much faster, can't raise RuntimeError, and should be better-behaved
in all respects wrt threads.
New tests test_weak_keyed_bad_delitem and
test_weak_keyed_cascading_deletes fail before this patch.
Bugfix candidate for 2.2.3 too, if someone else agrees with this patch.
float_pow(): Don't let the platform pow() raise -1.0 to an integer power
anymore; at least glibc gets it wrong in some cases. Note that
math.pow() will continue to deliver wrong (but platform-native) results
in such cases.
patterns as floats/doubles results in floating point exceptions.
Fix this by implementing a separate test_byteswap() for the floating
point tests. This new test compares the tostring() values of both arrays
instead of the arrays themselves.
Discovered by Neal Norwitz.
The compiler was reseting the list comprehension tmpname counter for each function, but the symtable was using the same counter for the entire module. Repair by move tmpname into the symtable entry.
Bugfix candidate.
one good use: a subclass adding a method to express the duration as
a number of hours (or minutes, or whatever else you want to add). The
native breakdown into days+seconds+us is often clumsy. Incidentally
moved a large chunk of object-initialization code closer to the top of
the file, to avoid worse forward-reference trickery.
attributes and methods work, that new arguments can be passed to the
constructor, and that inherited methods and attrs still work. Added
XXX comments about what to do when datetime becomes usably subclassable
too (it's not yet).
This file isn't meant to be executed, it's data input for test_tokenize.py.
The problem with the .py extension is that it uses "non-standard"
indentation, and it's good to test that, but reindent.py keeps wanting
to fix it. But fixing the indentation causes the expected-output file to
change, since exact line and column numbers are part of the
tokenize.tokenize() output getting tested.
Reverted a Py2.3b1 change to iterator in subclasses of list and tuple.
They had been changed to use __getitem__ whenever it had been overriden
in the subclass.
This caused some usabilty and performance problems. Also, it was
inconsistent with the rest of python where many container methods
access the underlying object directly without first checking for
an overridden getter. Users needing a change in iterator behavior
should override it directly.
('pgsql', '*', 252, []) and ('postgres', '*', 252, ['skip']),
but pwd.getgrgid(252) might return ('pgsql', '', 252, ['skip']).
Drop the test that tried to find a tuple similar to the one
returned from pwd.getgrgid() among those for the same gid returned
by pwd.getgrall(), as the only working definition of 'similar' seems
to be 'has the same gid'. This check can be done more directly.
This should fix SF bug #732783.