summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* Indentation normalization.Georg Brandl2008-01-191-8/+8
|
* Fix an edge case whereby the __del__() method of a classic class couldGuido van Rossum2008-01-181-0/+10
| | | | create a new weakref to the object.
* Silence Coverity false alerts with CIDs #172, #183, #184Christian Heimes2008-01-181-0/+1
|
* Temporarily revert 59967 until GC can be added.Raymond Hettinger2008-01-151-1/+1
|
* Issue 1820: structseq objects did not work with the % formatting operator ↵Raymond Hettinger2008-01-151-1/+1
| | | | | | or isinstance(t, tuple). Orignal patch (without tests) by Leif Walsh.
* Added more comments to the new structseq repr code and implemented several ↵Christian Heimes2008-01-141-17/+36
| | | | of Neal's suggestions.
* Now that I've learnt about structseq objects I felt like converting ↵Christian Heimes2008-01-141-29/+78
| | | | | | sys.float_info to a structseq. It's readonly and help(sys.float_info) explains the attributes nicely.
* I missed the most important fileChristian Heimes2008-01-141-5/+58
|
* Re-apply patch #1700288 (first applied in r59931, rolled back in r59940)Amaury Forgeot d'Arc2008-01-142-6/+208
| | | | | | now that ctypes uses a more supported method to create types: Method cache optimization, by Armin Rigo, ported to 2.6 by Kevin Jacobs.
* Back out r59931 - test_ctypes fails with it.Georg Brandl2008-01-132-208/+6
|
* Patch #1700288: Method cache optimization, by Armin Rigo, ported toGeorg Brandl2008-01-122-6/+208
| | | | 2.6 by Kevin Jacobs.
* Make Python compile with --disable-unicode.Georg Brandl2008-01-071-0/+2
|
* Continue rolling back pep-3141 changes that changed behavior from 2.5. ThisJeffrey Yasskin2008-01-053-121/+3
| | | | | | | | | | | | round included: * Revert round to its 2.6 behavior (half away from 0). * Because round, floor, and ceil always return float again, it's no longer necessary to have them delegate to __xxx___, so I've ripped that out of their implementations and the Real ABC. This also helps in implementing types that work in both 2.6 and 3.0: you return int from the __xxx__ methods, and let it get enabled by the version upgrade. * Make pow(-1, .5) raise a ValueError again.
* Make math.{floor,ceil}({int,long}) return float again for backwardsJeffrey Yasskin2008-01-042-4/+4
| | | | compatibility after r59671 made them return integral types.
* Bug #1481296: Fixed long(float('nan'))!=0L.Christian Heimes2008-01-041-0/+3
|
* Modified PyImport_Import and PyImport_ImportModule to always use absolute ↵Christian Heimes2008-01-031-1/+1
| | | | | | imports by calling __import__ with an explicit level of 0 Added a new API function PyImport_ImportModuleNoBlock. It solves the problem with dead locks when mixing threads and imports
* Backport PEP 3141 from the py3k branch to the trunk. This includes r50877 (justJeffrey Yasskin2008-01-034-63/+271
| | | | | | | the complex_pow part), r56649, r56652, r56715, r57296, r57302, r57359, r57361, r57372, r57738, r57739, r58017, r58039, r58040, and r59390, and new documentation. The only significant difference is that round(x) returns a float to preserve backward-compatibility. See http://bugs.python.org/issue1689.
* Fix refleakNeal Norwitz2007-12-311-0/+1
|
* Fix refleak introduced in r59576.Georg Brandl2007-12-201-0/+1
|
* Patch #1549 by Thomas Herve.Guido van Rossum2007-12-191-15/+18
| | | | | | This changes the rules for when __hash__ is inherited slightly, by allowing it to be inherited when one or more of __lt__, __le__, __gt__, __ge__ are overridden, as long as __eq__ and __ne__ aren't.
* #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and ↵Christian Heimes2007-12-1921-493/+493
| | | | Py_REFCNT. Macros for b/w compatibility are available.
* Applied patch #1635: Float patch for inf and nan on Windows (and other ↵Christian Heimes2007-12-181-1/+49
| | | | | | platforms). The patch unifies float("inf") and repr(float("inf")) on all platforms.
* Give meaning to the oparg for BUILD_MAP: estimated size of the dictionary.Raymond Hettinger2007-12-181-0/+17
| | | | | | | | | | | Allows dictionaries to be pre-sized (upto 255 elements) saving time lost to re-sizes with their attendant mallocs and re-insertions. Has zero effect on small dictionaries (5 elements or fewer), a slight benefit for dicts upto 22 elements (because they had to resize once anyway), and more benefit for dicts upto 255 elements (saving multiple resizes during the build-up and reducing the number of collisions on the first insertions). Beyond 255 elements, there is no addional benefit.
* Optimize PyList_AsTuple(). Improve cache performance by doing theRaymond Hettinger2007-12-151-5/+5
| | | | | | pointer copy and object increment in one pass. For small lists, save the overhead of the call to memcpy() -- this comes up in calls like f(*listcomp).
* Fixed bug #1620: New @spam.getter property syntax modifies the property in ↵Christian Heimes2007-12-141-33/+70
| | | | | | place. I added also the feature that a @prop.getter decorator does not overwrite the doc string of the property if it was given as an argument to property().
* The new float repr causes too much trouble and pain. I'm disabling the ↵Christian Heimes2007-12-111-1/+12
| | | | | | | feature until we have sorted out the issues on all machines. 64bit machines seem to have issues and Guido has reported even worse. Guido: It's pretty bad actually -- repr(1e5) comes out as '1.0'... Ditto for repr(1eN) for most N... Both in 2.6 and in 3.0...
* Backport of r59456:59458 from py3k to trunkChristian Heimes2007-12-102-2/+707
| | | | | | Issue #1580: New free format floating point representation based on "Floating-Point Printer Sample Code", by Robert G. Burger. For example repr(11./5) now returns '2.2' instead of '2.2000000000000002'. Thanks to noam for the patch! I had to modify doubledigits.c slightly to support X64 and IA64 machines on Windows. I also added the new file to the three project files.
* When splitting, avoid making a copy of the string if the split doesn't findSkip Montanaro2007-12-081-11/+42
| | | | anything (issue 1538).
* Note that open() is the preferred way to open files (issue 1510).Skip Montanaro2007-12-081-1/+2
|
* Fix Issue 1045.Raymond Hettinger2007-12-062-41/+39
| | | | | Factor-out common calling code by simplifying the length_hint API. Speed-up the function by caching the PyObject_String for the attribute lookup.
* merge -r59315:59316 from py3k: Fix issue #1553: An errornous __length_hint__ ↵Christian Heimes2007-12-052-4/+6
| | | | can make list() raise a SystemError
* Shut up a compiler warning.Guido van Rossum2007-12-031-0/+1
|
* Patch #1537 from Chad AustinChristian Heimes2007-12-031-2/+2
| | | | | Change GeneratorExit's base class from Exception to BaseException (This time I'm applying the patch to the correct sandbox.)
* Implement PEP 366Nick Coghlan2007-12-031-0/+2
|
* Feature #1534Christian Heimes2007-12-011-0/+47
| | | | | 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.
* Spaces vs. Tabs.Georg Brandl2007-11-291-4/+4
|
* Fix bug #1517, a segfault in lookdict().Guido van Rossum2007-11-291-0/+4
|
* Patch # 1507 by Mark Dickinson. Make complex(x, -0) retain the sign ofGuido van Rossum2007-11-271-9/+15
| | | | | the imaginary part (as long as it's not complex). Backport candidate?
* Issue #1445: Fix a SystemError when accessing the ``cell_contents``Amaury Forgeot d'Arc2007-11-241-1/+6
| | | | attribute of an empty cell object. Now a ValueError is raised.
* Backport of the PCbuild9 directory from the py3k branch.Christian Heimes2007-11-222-4/+4
| | | | | 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! :)
* Backport of _abccoll.py by Benjamin Arangueren, issue 1383.Guido van Rossum2007-11-225-44/+46
| | | | With some changes of my own thrown in (e.g. backport of r58107).
* The incremental decoder for utf-7 must preserve its state between calls.Amaury Forgeot d'Arc2007-11-201-2/+19
| | | | | | | 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.
* Made _ParseTupleFinds only defined to unicodeobject.cFacundo Batista2007-11-162-0/+4
|
* Fix for stupid error (I need to remember to do a full 'make clean + make'Facundo Batista2007-11-161-1/+1
| | | | cycle before the tests...). Sorry.
* Now in find, rfind, index, and rindex, you can use None as defaults,Facundo Batista2007-11-163-32/+74
| | | | | | | | | | | | 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.
* Re-word sentenceAndrew M. Kuchling2007-11-121-1/+1
|
* Added new decorator syntax to property.__doc__Christian Heimes2007-11-121-4/+14
| | | | Guido prefers _x over __x.
* Issue 1416. Add getter, setter, deleter methods to properties that can beGuido van Rossum2007-11-101-1/+55
| | | | used as decorators to create fully-populated properties.
* Optimize common case for dict.fromkeys().Raymond Hettinger2007-11-091-10/+15
|
* Reposition the decref (spotted by eagle-eye norwitz).Raymond Hettinger2007-11-081-1/+2
|