| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
sorted() becomes a regular function instead of a classmethod.
|
|
|
|
|
|
|
|
|
|
| |
and left shifts. (Thanks to Kalle Svensson for SF patch 849227.)
This addresses most of the remaining semantic changes promised by
PEP 237, except for repr() of a long, which still shows the trailing
'L'. The PEP appears to promise warnings for operations that
changed semantics compared to Python 2.3, but this is not
implemented; we've suffered through enough warnings related to
hex/oct literals and I think it's best to be silent now.
|
|
|
|
|
|
|
|
| |
* Install the unittests, docs, newsitem, include file, and makefile update.
* Exercise the new functions whereever sets.py was being used.
Includes the docs for libfuncs.tex. Separate docs for the types are
forthcoming.
|
|
|
|
|
| |
SF patch 825639
http://mail.python.org/pipermail/python-dev/2003-October/039445.html
|
|
|
|
|
|
| |
unchanged (and sys.gettotalrefcount() remains constant).
Fix a few typos.
|
|
|
|
| |
by returning an empty list instead of raising a TypeError.
|
|
|
|
|
|
|
|
| |
Move the constructor tests from test_builtin to test_complex.
Add a bunch of tests (code coverage is a 94%).
From SF patch #736962.
|
|
|
|
| |
Improves clarity and brevity.
|
|
|
|
|
|
|
|
|
|
| |
and test_support.run_classtests() into run_unittest()
and use it wherever possible.
Also don't use "from test.test_support import ...", but
"from test import test_support" in a few spots.
From SF patch #662807.
|
| |
|
| |
|
|
|
|
| |
cases, but the test still expected ValueError. Repaired that.
|
|
|
|
|
|
|
| |
- range() now works even if the arguments are longs with magnitude
larger than sys.maxint, as long as the total length of the sequence
fits. E.g., range(2**100, 2**101, 2**100) is the following list:
[1267650600228229401496703205376L]. (SF patch #707427.)
|
| |
|
|
|
|
|
| |
instead of PyTuple_GetItem, so an overwritten __getitem__
in a tuple subclass works. SF bug #665835.
|
|
|
|
|
|
|
|
|
|
|
|
| |
object is not a real str or unicode but an instance
of a subclass, construct the output via looping
over __getitem__. This guarantees that the result
is the same for function==None and function==lambda x:x
This doesn't happen for tuples, because filtertuple()
uses PyTuple_GetItem().
(This was discussed on SF bug #665835).
|
|
|
|
| |
Incorporated nnorwitz's comment re. Py__USING_UNICODE.
|
|
|
|
| |
mark. Added unit test.
|
|
|
|
| |
subclasses. (Discussed in SF patch #665835)
|
|
|
|
|
| |
str and unicode subclasses not just for generating the output
but for testing too.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
blindly assumed that tp_as_sequence->sq_item always returns
a str or unicode object. This might fail with str or unicode
subclasses.
This patch checks whether the object returned from __getitem__
is a str/unicode object and raises a TypeError if not (and
the filter function returned true).
Furthermore the result for __getitem__ can be more than one
character long, so checks for enough memory have to be done.
|
|
|
|
| |
Check return value of PyLong_AsDouble(), it can return an error.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
port the tests to PyUnit and add many tests for error
cases. This increases code coverage in Python/bltinmodule.c
from 75% to 92%. (From SF patch #662807, with
assert_(not fcmp(x, y)) replaced with assertAlmostEqual(x, y)
where possible)
|
|
|
|
|
|
|
|
| |
imports of test modules now import from the test package. Other
related oddities are also fixed (like DeprecationWarning filters that
weren't specifying the full import part, etc.). Also did a general
code cleanup to remove all "from test.test_support import *"'s. Other
from...import *'s weren't changed.
|
|
|