summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* Fix Windows build (re r77461)Antoine Pitrou2010-01-131-1/+1
|
* Issue #7622: Improve the split(), rsplit(), splitlines() and replace()Antoine Pitrou2010-01-1313-1442/+704
| | | | | methods of bytes, bytearray and unicode objects by using a common implementation based on stringlib's fast search. Patch by Florent Xicluna.
* Fixed repr of dictionary views.Alexandre Vassalotti2010-01-121-1/+2
|
* Issue #1967: Backport dictionary views.Alexandre Vassalotti2010-01-111-0/+505
|
* factor out __complex__ lookup code to fix another caseBenjamin Peterson2010-01-041-50/+44
|
* do correct lookup of the __complex__ methodBenjamin Peterson2010-01-041-8/+14
|
* Issue #7462: Implement the stringlib fast search algorithm for the `rfind`,Antoine Pitrou2010-01-028-148/+114
| | | | `rindex`, `rsplit` and `rpartition` methods. Patch by Florent Xicluna.
* Refactor some longobject internals: PyLong_AsDouble and _PyLong_AsScaledDoubleMark Dickinson2010-01-021-221/+146
| | | | | | | | (the latter renamed to _PyLong_Frexp) now use the same core code. The exponent produced by _PyLong_Frexp now has type Py_ssize_t instead of the previously used int, and no longer needs scaling by PyLong_SHIFT. This frees the math module from having to know anything about the PyLong implementation. This closes issue #5576.
* Issue #7534: Fix handling of nans, infinities, and negative zero in **Mark Dickinson2009-12-301-23/+74
| | | | operator, on IEEE 754 platforms. Thanks Marcos Donolo for original patch.
* Issue #1811: Improve accuracy and consistency of true division for integers.Mark Dickinson2009-12-272-37/+277
|
* #6108: unicode(exception) and str(exception) should return the same messageEzio Melotti2009-12-241-0/+15
|
* Issue #7528: Backport PyLong_AsLongAndOverflow from py3k to trunk.Mark Dickinson2009-12-211-31/+101
| | | | Thanks Case Van Horsen for the patch.
* remove type_compare, since type_richcompare does the same trickBenjamin Peterson2009-12-161-10/+1
|
* Issue #1680159: unicode coercion during an 'in' operation was maskingR. David Murray2009-12-141-2/+0
| | | | | | | any errors that might occur during coercion of the left operand and turning them into a TypeError with a message text that was confusing in the given context. This patch lets any errors through, as was already done during coercion of the right hand side.
* fix the ignoring of __cmp__ method on metaclasses #7491Benjamin Peterson2009-12-131-1/+5
|
* Issue #7466: segmentation fault when the garbage collector is calledAntoine Pitrou2009-12-121-1/+2
| | | | | | in the middle of populating a tuple. Patch by Florent Xicluna. (note: no NEWS entry for trunk since the bug was introduced in 2.7/3.1)
* substitute PyDict_Check() for PyObject_IsInstanceBenjamin Peterson2009-12-101-1/+1
|
* Avoid undefined behaviour due to overflow in i_divmod (Objects/intobject.c).Mark Dickinson2009-12-041-1/+10
|
* disable pymalloc tricks with the --with-valgrind option #2422Benjamin Peterson2009-12-031-0/+39
| | | | Patch from James Henstridge.
* Issue #7406: Fix some occurrences of potential signed overflow in intMark Dickinson2009-12-021-3/+6
| | | | arithmetic.
* Issue #3382: Make '%F' and float.__format__('F') convert results to upper ↵Eric Smith2009-11-293-18/+0
| | | | case. Much of the patch came from Mark Dickinson.
* Include ieeefp.h (when available) in pyport.h instead of individually inMark Dickinson2009-11-282-8/+0
| | | | | | Objects/floatobject.c and Objects/complexobject.c. This should silence compiler warnings about implicit declaration of the 'finite' function on Solaris.
* Issue #7117, continued: Remove substitution of %g-style formatting forMark Dickinson2009-11-233-12/+0
| | | | | %f-style formatting, which used to occur at high precision. Float formatting should now be consistent between 2.7 and 3.1.
* Remove restriction on precision when formatting floats. This is theMark Dickinson2009-11-232-114/+42
| | | | | first step towards removing the %f -> %g switch (see issues 7117, 5859).
* #5037 proxy __unicode__ correctlyBenjamin Peterson2009-11-191-0/+17
|
* Issue 7263: Fix set.intersection() docstring.Raymond Hettinger2009-11-181-2/+2
|
* Issue #7117, continued: Change round implementation to use the ↵Mark Dickinson2009-11-181-0/+196
| | | | | | | | correctly-rounded string <-> float conversions; this makes sure that the result of the round operation is correctly rounded, and hence displays nicely using the new float repr.
* Silence another MSVC warning about unary minus.Mark Dickinson2009-11-161-1/+1
|
* Silence MSVC warning about unary minus applied to unsigned type.Mark Dickinson2009-11-161-1/+1
|
* Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,Mark Dickinson2009-11-151-12/+59
| | | | PyFormat_FromStringV and PyErr_Format.
* Avoid signed overflow in some xrange calculations, and extendMark Dickinson2009-11-151-34/+44
| | | | | | xrange tests to cover some special cases that caused problems in py3k. This is a partial backport of r76292-76293 (see issue #7298.)
* grant list.index() a more informative error message #7252Benjamin Peterson2009-11-021-2/+16
|
* prevent a rather unlikely segfaultBenjamin Peterson2009-11-021-2/+8
|
* Issue #7117: Use PyOS_string_to_double instead of PyOS_ascii_strtod inMark Dickinson2009-10-261-16/+29
| | | | | complexobject.c. Also remove length restriction on unicode inputs to the complex constructor.
* Issue #7117: Use PyOS_string_to_double instead of PyOS_ascii_strtod inMark Dickinson2009-10-261-35/+24
| | | | | floatobject.c. Also, remove limitation on length of unicode inputs to float().
* Finished removing _PyOS_double_to_string, as mentioned in issue 7117.Eric Smith2009-10-262-17/+28
|
* Start to remove _PyOS_double_to_string, as mentioned in issue 7117.Eric Smith2009-10-261-22/+36
|
* Issue #1087418: Small performance boost for bitwise operations on longs.Mark Dickinson2009-10-251-66/+100
| | | | Initial patch by Gregory Smith; some tweaks added.
* Removed unused function PyFloat_AsStringEx. It is unused in floatobject.c, ↵Eric Smith2009-10-241-11/+0
| | | | and it's not declared in any .h file.
* rewrite for style, clarify, and commentsBenjamin Peterson2009-10-221-12/+15
| | | | Also, use the hasattr() like scheme of allowing BaseException exceptions through.
* whitespaceBenjamin Peterson2009-10-221-1/+1
|
* Removed usage of unsafe PyFloat_AsString.Eric Smith2009-10-161-7/+13
|
* Issue #7142: Fix uses of unicode in memoryview objectsMark Dickinson2009-10-151-2/+2
|
* only clear a module's __dict__ if the module is the only one with a ↵Benjamin Peterson2009-10-151-1/+4
| | | | reference to it #7140
* Fix missing semicolonMark Dickinson2009-10-151-1/+1
|
* #7116: str.join() takes an iterable.Georg Brandl2009-10-142-4/+4
|
* #7112: Fix compilation warning in unicodetype_db.hAmaury Forgeot d'Arc2009-10-131-109/+109
| | | | makeunicodedata now generates double literals
* Issue #7084: Fix a (very unlikely) crash when printing a list from oneAntoine Pitrou2009-10-111-1/+6
| | | | thread, and mutating it from another one. Patch by Scott Dial.
* #1571184: makeunicodedata.py now generates the functions _PyUnicode_ToNumeric,Amaury Forgeot d'Arc2009-10-062-1765/+2877
| | | | | | _PyUnicode_IsLinebreak and _PyUnicode_IsWhitespace. It now also parses the Unihan.txt for numeric values.
* Style/consistency/nano-optimization nit: replace occurrences ofMark Dickinson2009-09-281-6/+6
| | | | | | | | | | (high_bits << PyLong_SHIFT) + low_bits with (high_bits << PyLong_SHIFT) | low_bits in Objects/longobject.c. Motivation: - shouldn't unnecessarily mix bit ops with arithmetic ops (style) - this pattern should be spelt the same way thoughout (consistency) - it's very very very slightly faster: no need to worry about carries to the high digit (nano-optimization).