summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Continue rolling back pep-3141 changes that changed behavior from 2.5. ThisJeffrey Yasskin2008-01-051-17/+25
| | | | | | | | | | | | 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.
* Backport PEP 3141 from the py3k branch to the trunk. This includes r50877 (justJeffrey Yasskin2008-01-031-23/+30
| | | | | | | 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.
* Improve performance of built-in any()/all() by avoiding PyIter_Next() --Guido van Rossum2007-12-201-8/+28
| | | | | using a trick found in ifilter(). Feel free to backport to 2.5.
* Note that open() is the preferred way to open files (issue 1510).Skip Montanaro2007-12-081-1/+2
|
* Fix Issue 1045.Raymond Hettinger2007-12-061-24/+3
| | | | | Factor-out common calling code by simplifying the length_hint API. Speed-up the function by caching the PyObject_String for the attribute lookup.
* Missing DECREFsRaymond Hettinger2007-10-251-0/+2
|
* Fixup error return and add support for intermixed ints and floats/Raymond Hettinger2007-10-241-1/+7
|
* Optimize sum() for integer and float inputs.Raymond Hettinger2007-10-241-0/+70
|
* Add a bunch more deprecation warnings for builtins that are going away in 3.0Neal Norwitz2007-05-231-0/+24
|
* Add -3 option to the interpreter to warn about features that areNeal Norwitz2007-05-231-0/+5
| | | | | | | deprecated and will be changed/removed in Python 3.0. This patch is mostly from Anthony. I tweaked some format and added a little doc.
* Patch #1444529: the builtin compile() now accepts keyword arguments.Georg Brandl2007-03-131-4/+7
| | | | (backport)
* Typo and grammar fixes.Georg Brandl2007-03-131-1/+1
|
* Backport from Py3k branch:Georg Brandl2007-03-121-9/+10
| | | | | | | Patch #1591665: implement the __dir__() special function lookup in PyObject_Dir. Had to change a few bits of the patch because classobjs and __methods__ are still in Py2.6.
* Bug #1283491: follow docstring convention wrt. keyword-able args in sum().Georg Brandl2006-10-121-2/+3
|
* Fix SF #1552093, eval docstring typo (3 ps in mapping)Neal Norwitz2006-09-051-1/+1
|
* It's highly unlikely, though possible for PyEval_Get*() to return NULLs.Neal Norwitz2006-08-121-2/+2
| | | | | | So be safe and do an XINCREF. Klocwork # 221-222.