summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Untabify C files. Will watch buildbots.Antoine Pitrou2010-05-091-2170/+2170
|
* Fix trailing whitespace.Mark Dickinson2010-05-041-1/+1
|
* Issue #1533: fix inconsistency in range function argument processing:Mark Dickinson2010-05-041-46/+73
| | | | | | | | | any non-float non-integer argument is now converted to an integer (if possible) using its __int__ method. Previously, only small arguments were treated this way; larger arguments (those whose __int__ was outside the range of a C long) would produce a TypeError. Patch by Alexander Belopolsky (with minor modifications).
* account for PyObject_IsInstance's new ability to failBenjamin Peterson2009-12-131-1/+5
|
* Issue #6985: number of range() items should be constrained to lieMark Dickinson2009-12-031-4/+4
| | | | in a Py_ssize_t, not an int.
* round(0, "ermintrude") succeeded instead of producing a TypeError. Fix this.Mark Dickinson2009-11-241-4/+4
|
* Issue #7117, continued: Change round implementation to use the ↵Mark Dickinson2009-11-181-19/+38
| | | | | | | | 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.
* a better callable replacementBenjamin Peterson2009-11-171-1/+1
|
* Warn against replacing PyNumber_Add with PyNumber_InPlaceAdd in sumMark Dickinson2009-10-261-0/+9
|
* revert r74699 since it loses useful error informationBenjamin Peterson2009-09-071-2/+13
|
* PyObject_GetIter can set an error for its self just fineBenjamin Peterson2009-09-061-13/+2
|
* when print() gets unicode arguments, sep and end should be unicode by ↵Benjamin Peterson2009-07-021-18/+74
| | | | default #4618
* further hint to where the open docs really arePhilip Jenvey2009-05-281-1/+1
|
* don't ignore exceptions from _PyObject_LengthHintBenjamin Peterson2009-05-091-1/+3
|
* Issue #1869: Fix a couple of minor round() issues.Mark Dickinson2009-04-181-4/+1
|
* Issue #2396: backport the memoryview object.Antoine Pitrou2009-04-021-1/+1
|
* Issue 1242657: list(obj) can swallow KeyboardInterrupt.Raymond Hettinger2009-02-021-0/+2
|
* follup to #3473: don't duplicate the reduce codeBenjamin Peterson2008-08-181-56/+10
|
* #3479: unichr(2**32) used to return u'\x00'.Amaury Forgeot d'Arc2008-07-311-2/+2
| | | | | | The argument was fetched in a long, but PyUnicode_FromOrdinal takes an int. (why doesn't gcc issue a truncation warning in this case?)
* Revert 64424, 64438, and 64439.Raymond Hettinger2008-06-241-18/+1
|
* Make bin() implementation parallel oct() and hex() so that int/long ↵Raymond Hettinger2008-06-201-1/+18
| | | | subclasses can override or so that other classes can support.
* Merge in release25-maint r60793:Gregory P. Smith2008-06-111-4/+56
| | | | | | Added checks for integer overflows, contributed by Google. Some are only available if asserts are left in the code, in cases where they can't be triggered from Python code.
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-30/+30
| | | | | | | http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
* Issue 2784: fix leaks in exception exit.Raymond Hettinger2008-05-301-2/+2
|
* Renamed PyString to PyBytesChristian Heimes2008-05-261-30/+30
|
* First step of the C API rename:Christian Heimes2008-05-261-4/+4
| | | | | | renamed Include/bytesobject.h to Include/bytearrayobject.h renamed Include/stringobject.h to Include/bytesobject.h added Include/stringobject.h with aliases
* revert 63425 over Guido's Febuary message about this, that I missedBenjamin Peterson2008-05-171-27/+15
|
* fix spellingBenjamin Peterson2008-05-171-1/+1
|
* add Py3k warnings to oct and hex. backport hex behavior (because it's not ↵Benjamin Peterson2008-05-171-15/+27
| | | | different)
* #2196 hasattr now allows SystemExit and KeyboardInterrupt to propagateBenjamin Peterson2008-05-121-3/+7
|
* #2719: backport next() from 3k.Georg Brandl2008-04-301-0/+42
|
* A little reformating of Py3k warningsBenjamin Peterson2008-04-271-6/+6
|
* Use PyErr_WarnPy3k throughoutBenjamin Peterson2008-04-271-25/+13
|
* Properly check for consistency with the third argument ofGeorg Brandl2008-03-291-16/+16
| | | | compile() when compiling an AST node.
* Patch #1810 by Thomas Lee, reviewed by myself:Georg Brandl2008-03-281-19/+44
| | | | | allow compiling Python AST objects into code objects in compile().
* Merged revisions ↵Christian Heimes2008-03-261-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 61750,61752,61754,61756,61760,61763,61768,61772,61775,61805,61809,61812,61819,61917,61920,61930,61933-61934 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/trunk-bytearray ........ r61750 | christian.heimes | 2008-03-22 20:47:44 +0100 (Sat, 22 Mar 2008) | 1 line Copied files from py3k w/o modifications ........ r61752 | christian.heimes | 2008-03-22 20:53:20 +0100 (Sat, 22 Mar 2008) | 7 lines Take One * Added initialization code, warnings, flags etc. to the appropriate places * Added new buffer interface to string type * Modified tests * Modified Makefile.pre.in to compile the new files * Added bytesobject.c to Python.h ........ r61754 | christian.heimes | 2008-03-22 21:22:19 +0100 (Sat, 22 Mar 2008) | 2 lines Disabled bytearray.extend for now since it causes an infinite recursion Fixed serveral unit tests ........ r61756 | christian.heimes | 2008-03-22 21:43:38 +0100 (Sat, 22 Mar 2008) | 5 lines Added PyBytes support to several places: str + bytearray ord(bytearray) bytearray(str, encoding) ........ r61760 | christian.heimes | 2008-03-22 21:56:32 +0100 (Sat, 22 Mar 2008) | 1 line Fixed more unit tests related to type('') is not unicode ........ r61763 | christian.heimes | 2008-03-22 22:20:28 +0100 (Sat, 22 Mar 2008) | 2 lines Fixed more unit tests Fixed bytearray.extend ........ r61768 | christian.heimes | 2008-03-22 22:40:50 +0100 (Sat, 22 Mar 2008) | 1 line Implemented old buffer interface for bytearray ........ r61772 | christian.heimes | 2008-03-22 23:24:52 +0100 (Sat, 22 Mar 2008) | 1 line Added backport of the io module ........ r61775 | christian.heimes | 2008-03-23 03:50:49 +0100 (Sun, 23 Mar 2008) | 1 line Fix str assignement to bytearray. Assignment of a str of size 1 is interpreted as a single byte ........ r61805 | christian.heimes | 2008-03-23 19:33:48 +0100 (Sun, 23 Mar 2008) | 3 lines Fixed more tests Fixed bytearray() comparsion with unicode() Fixed iterator assignment of bytearray ........ r61809 | christian.heimes | 2008-03-23 21:02:21 +0100 (Sun, 23 Mar 2008) | 2 lines str(bytesarray()) now returns the bytes and not the representation of the bytearray object Enabled and fixed more unit tests ........ r61812 | christian.heimes | 2008-03-23 21:53:08 +0100 (Sun, 23 Mar 2008) | 3 lines Clear error PyNumber_AsSsize_t() fails Use CHARMASK for ob_svall access disabled a test with memoryview again ........ r61819 | christian.heimes | 2008-03-23 23:05:57 +0100 (Sun, 23 Mar 2008) | 1 line Untested updates to the PCBuild directory ........ r61917 | christian.heimes | 2008-03-26 00:57:06 +0100 (Wed, 26 Mar 2008) | 1 line The type system of Python 2.6 has subtle differences to 3.0's. I've removed the Py_TPFLAGS_BASETYPE flags from bytearray for now. bytearray can't be subclasses until the issues with bytearray subclasses are fixed. ........ r61920 | christian.heimes | 2008-03-26 01:44:08 +0100 (Wed, 26 Mar 2008) | 2 lines Disabled last failing test I don't understand what the test is testing and how it suppose to work. Ka-Ping, please check it out. ........ r61930 | christian.heimes | 2008-03-26 12:46:18 +0100 (Wed, 26 Mar 2008) | 1 line Re-enabled bytes warning code ........ r61933 | christian.heimes | 2008-03-26 13:20:46 +0100 (Wed, 26 Mar 2008) | 1 line Fixed a bug in the new buffer protocol. The buffer slots weren't copied into a subclass. ........ r61934 | christian.heimes | 2008-03-26 13:25:09 +0100 (Wed, 26 Mar 2008) | 1 line Re-enabled bytearray subclassing - all tests are passing. ........
* Make Py3k warnings consistent w.r.t. punctuation; also respect theGeorg Brandl2008-03-251-6/+10
| | | | EOL 80 limit and supply more alternatives in warning messages.
* The filter() function does support a None argument in Py3.0.Raymond Hettinger2008-03-191-7/+0
|
* Backport of the print function, using a __future__ import.Eric Smith2008-03-181-0/+73
| | | | | | | | This work is substantially Anthony Baxter's, from issue 1633807. I just freshened it, made a few minor tweaks, and added the test cases. I also created issue 2412, which is to check for 2to3's behavior with the print function. I also added myself to ACKS.
* Added a warning when -3 is enabled and None is passed to filter as the first ↵David Wolever2008-03-181-0/+7
| | | | argument.
* Finish backporting new buffer API to Python 2.6. Left to do: memoryview ↵Travis E. Oliphant2008-03-181-0/+1
| | | | object and structmodule. But, these need to be finished in Python 3.0 first. No objects support the new buffer API in Python 2.6 as of yet, and except for the memoryview object, I don't think they will.
* Add a little info to the 3k deprecation warnings about what to use instead.Neal Norwitz2008-02-241-4/+4
| | | | Suggested by Raymond Hettinger.
* map(None, ...) is not supported in 3.0.Neal Norwitz2008-02-241-3/+9
|
* Added bin() builtin. I'm going to check in the tests in a seperate checkin, ↵Eric Smith2008-02-221-0/+13
| | | | because the builtin doesn't need to be ported to py3k, but the tests are missing in py3k and need to be merged there.
* Backport of PEP 3101, Advanced String Formatting, from py3k.Eric Smith2008-02-171-0/+19
| | | | | | | | | | | | | | | Highlights: - Adding PyObject_Format. - Adding string.Format class. - Adding __format__ for str, unicode, int, long, float, datetime. - Adding builtin format. - Adding ''.format and u''.format. - str/unicode fixups for formatters. The files in Objects/stringlib that implement PEP 3101 (stringdefs.h, unicodedefs.h, formatter.h, string_format.h) are identical in trunk and py3k. Any changes from here on should be made to trunk, and changes will propogate to py3k).
* Move __builtins__.trunc() to math.trunc() perJeffrey Yasskin2008-02-011-15/+0
| | | | | http://mail.python.org/pipermail/python-dev/2008-January/076626.html and issue 1965.
* CallMethod is faster with a NULL third-argument than with an empty format ↵Raymond Hettinger2008-01-291-1/+1
| | | | string.
* Fix two crashers.Guido van Rossum2008-01-231-1/+6
|
* Added bytes and b'' as aliases for str and ''Christian Heimes2008-01-181-0/+1
|
* Fix C++-style comment.Georg Brandl2008-01-051-3/+3
|