summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* Constify char* API. Fixes #651363. 2.2 candidate.Martin v. Löwis2002-12-111-3/+3
|
* Patch #650834: Document 'U' in file mode, remove stale variables.Martin v. Löwis2002-12-111-5/+1
|
* Update comments about the performance of xrange().Raymond Hettinger2002-12-111-2/+2
|
* SF 548651: Fix the METH_CLASS implementation.Tim Peters2002-12-093-4/+75
| | | | | | | Most of these patches are from Thomas Heller, with long lines folded by Tim. The change to test_descr.py is from Guido. See the bug report. Not a bugfix candidate -- METH_CLASS is new in 2.3.
* slot_nb_nonzero(): Another leak uncovered by the sandbox datetimeTim Peters2002-12-071-28/+27
| | | | | | | tests. I found the logic too confusing to follow here, so rewrote more than was likely absolutely necessary. Bugfix candidate.
* Fix typo in abstract.c which caused __rpow__ to not be invoked.Raymond Hettinger2002-12-071-1/+1
| | | | | Added related testcase. Closes SF bug #643260.
* Remove assumption that cls is a subclass of dict.Raymond Hettinger2002-12-071-7/+1
| | | | Simplifies the code and gets Just van Rossum's example to work.
* slot_tp_hash(): In the normal path, this leaked a reference to theTim Peters2002-12-061-3/+3
| | | | | | integer hash object returned by __hash__(). This accounts for some of the "mystery leaks" in the sandbox datetime tests, but probably not all of them.
* Patch #614055: Support OpenVMS.Martin v. Löwis2002-12-061-1/+5
|
* The final tweaks before closingMichael W. Hudson2002-12-051-20/+23
| | | | | | [ 633152 ] list slice ass ignores subtypes of list Allow arbitrary sequences on the RHS of extended slices.
* Replace BadInternalCall with TypeError. Add a test case. Fix whitespace.Raymond Hettinger2002-12-041-2/+3
| | | | | | | Just van Rossum showed a weird, but clever way for pure python code to trigger the BadInternalCall. The C code had assumed that calling a class constructor would return an instance of that class; however, classes that abuse __new__ can invalidate that assumption.
* Add missing decrefNeal Norwitz2002-11-271-0/+1
|
* Nudge getting __module__ and __name__ for new-style classes so thatMichael W. Hudson2002-11-271-17/+24
| | | | | | | the results of *setting* __name__ are not so surprising. If people can suggest more tests, that'd be grand, or is what's there sufficient?
* I don't know why staring at the email to python-checkins made meMichael W. Hudson2002-11-271-9/+14
| | | | | | | see problems with my code that I didn't see before the checkin, but: When a subtype .mro() fails, we need to reset the type whose __bases__ are being changed, too. Fix + test.
* Readjustments to the way we cope with exceptions from subclasses'Michael W. Hudson2002-11-271-10/+32
| | | | | | mro() methods. Now any exception aborts the whole __bases__ change. And more tests.
* I had the inheritance cycle stuff backwards. Oops!Michael W. Hudson2002-11-271-4/+6
|
* SF Patch 643443. Added dict.fromkeys(iterable, value=None), a classRaymond Hettinger2002-11-271-0/+56
| | | | method for constructing new dictionaries from sequences of keys.
* Initialize a variable. Hope this makes things work for Guido.Michael W. Hudson2002-11-261-1/+1
| | | | It's odd that gcc on my ibook didn't complain about this.
* This is my patch:Michael W. Hudson2002-11-261-34/+277
| | | | | | | | | | | | [ 635933 ] make some type attrs writable Plus a couple of extra tests beyond what's up there. It hasn't been as carefully reviewed as it perhaps should, so all readers are encouraged, nay exhorted, to give this a close reading. There are still a couple of oddities related to assigning to __name__, but I intend to solicit python-dev's opinions on these.
* A tweaked version of Jeremy's patch #642489, to produce better errorGuido van Rossum2002-11-251-4/+138
| | | | | | messages about MRO conflicts. (The tweaks include correcting spelling errors, some refactoring to get the name of classic classes, and a style nit or two.)
* Add unidata_version. Bump generator version number.Martin v. Löwis2002-11-251-1/+1
|
* Regenerate from Unicode 3.2.0 to include all First/Last ranges.Martin v. Löwis2002-11-241-108/+77
|
* Simplify use of NB_BINOP and NB_TERNOP by making them do the pointerNeil Schemenauer2002-11-241-15/+15
| | | | dereference rather than the caller.
* Remove special handling of str and unicode in PyNumber_InPlaceRemainder. TheyNeil Schemenauer2002-11-241-9/+2
| | | | both have a nb_remainer slot.
* Patch #642500 with slight modifications: allow keyword arguments inJust van Rossum2002-11-231-5/+7
| | | | | | | dict() constructor. Example: >>> dict(a=1, b=2) {'a': 1, 'b': 2} >>>
* Remove MALLOC_ZERO_RETURNS_NULL.Martin v. Löwis2002-11-231-2/+0
|
* Fix --disable-unicode compilation problems.Martin v. Löwis2002-11-211-0/+4
|
* float_int(): Some systems raise an exception if a double is cast toTim Peters2002-11-211-14/+16
| | | | | | | | long but the double is too big to fit in a long. Prevent that. This closes some recent bug or patch on SF, but SF is down now so I can't say which. Bugfix candidate.
* Change int() so that passing a string, unicode, float or long argumentWalter Dörwald2002-11-193-24/+45
| | | | | | | that is outside the integer range no longer raises OverflowError, but returns a long object instead. This fixes SF bug http://www.python.org/sf/635115
* Add nb_remainder (i.e. __mod__) slot to unicode type. Fixes SF bug #615506.Neil Schemenauer2002-11-181-2/+21
|
* Add nb_remainder (i.e. __mod__) slot to str type. Fixes SF bug #615506.Neil Schemenauer2002-11-181-2/+22
|
* Improve exception message raised by PyFloat_AsDouble if the object does notNeil Schemenauer2002-11-181-2/+6
| | | | have a nb_float slot. This matches what PyInt_AsLong does.
* str and unicode objects now have a __mod__ slot so don't special case them inNeil Schemenauer2002-11-181-6/+0
| | | | | PyNumber_Remainder(). This fixes SF bug #615506 and allows string and unicode subclasses to override __mod__.
* Remove _Py_ResetReferences. Fixes bug #529750 "Circular reference makesNeil Schemenauer2002-11-171-7/+0
| | | | | | Py_Init crash". refchain cannot be cleared because objects can live across Py_Finalize() and Py_Initialize() if they are kept alive by circular references.
* Repaired illegal syntax most compilers probably let slide (but MSVCTim Peters2002-11-141-1/+1
| | | | treats as a fatal error).
* Use the new C3 MRO algorithm, implemented by Samuele Pedroni (SF patchGuido van Rossum2002-11-141-74/+105
| | | | | | | | | | 619475; also closing SF bug 618704). I tweaked his code a bit for style. This raises TypeError for MRO order disagreements, which is an improvement (previously these went undetected) but also a degradation: what if the order disagreement doesn't affect any method lookups? I don't think I care.
* Fix SF # 635969, No error "not all arguments converted"Neal Norwitz2002-11-122-2/+4
| | | | | | | | | When mwh added extended slicing, strings and unicode became mappings. Thus, dict was set which prevented an error when doing: newstr = 'format without a percent' % string_value This fix raises an exception again when there are no formats and % with a string value.
* SF patch 637176: list.sort crasherTim Peters2002-11-121-96/+29
| | | | | | | | | | | Armin Rigo's Draconian but effective fix for SF bug 453523: list.sort crasher slightly fiddled to catch more cases of list mutation. The dreaded internal "immutable list type" is gone! OTOH, if you look at a list *while* it's being sorted now, it will appear to be empty. Better than a core dump.
* Restore attribute access so that the following work again:Raymond Hettinger2002-11-071-1/+1
| | | | | dir(xrange(10)) xrange(10).__getitem__(4)
* Make int("...") return a long if an int would overflow.Walter Dörwald2002-11-062-19/+23
| | | | | | Also remove the 512 character limitation for int(u"...") and long(u"..."). This closes SF bug #629989.
* Handle really big steps in extended slices.Michael W. Hudson2002-11-061-5/+2
| | | | Fixes a test failure on 64 bit platforms (I hope).
* Use PyOS_snprintf() instead of sprintf and wrap the long lineNeal Norwitz2002-11-051-2/+4
|
* Use PyList_CheckExact and PyTuple_CheckExact for checking whetherMichael W. Hudson2002-11-051-1/+1
| | | | PySequence_Fast needs to do anything siginificant.
* This is Alex Martelli's patchMichael W. Hudson2002-11-051-9/+12
| | | | | | [ 633870 ] allow any seq assignment to a list slice plus a very silly little test case of my own.
* Some days, I think my comment ofMichael W. Hudson2002-11-051-6/+12
| | | | | | | | | | | | /* this is harder to get right than you might think */ angered some God somewhere. After noticing >>> range(5000000)[slice(96360, None, 439)] [] I found that my cute test for the slice being empty failed due to overflow. Fixed, and added simple test (not the above!).
* Since properties are supported here, is possible thatGuido van Rossum2002-10-291-13/+12
| | | | | | | instance_getattr2() raises an exception. Fix all code that made this assumption. Backport candidate.
* Patch #627105: Document that SYSTEM_PAGE_SIZE really should not beMartin v. Löwis2002-10-261-1/+4
| | | | larger than the system page size.
* Fix for bug #626172: crash using unicode latin1 single charMarc-André Lemburg2002-10-231-3/+1
| | | | Python 2.2.3 candidate.
* Make lower/upper/title work for non-BMP characters.Martin v. Löwis2002-10-181-24/+15
|
* Fix SF # 624982, Potential AV in slot_sq_item, by Greg ChapmanNeal Norwitz2002-10-181-1/+5
| | | | Don't crash when getting value of a property raises an exception