summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* [2.7] Issue GH-18560: Fix potential NULL pointer dereference in sum(). (GH-8892)Benjamin Peterson2018-08-241-0/+5
| | | | | (cherry picked from commit 704e2d374f88bca83339b95d559b0abce12dc6bd) Co-authored-by: Christian Heimes <christian@cheimes.de>
* closes bpo-34474: Python/bltinmodule.c: Add missing NULL check in ↵Miss Islington (bot)2018-08-241-0/+5
| | | | | | | | builtin_sum_impl() (GH-8872) Reported by Svace static analyzer. (cherry picked from commit 2b824b2538c4a5f9f520c5de8a1eae5a0c181a94) Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
* [2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479)Serhiy Storchaka2018-07-311-2/+2
|
* bpo-32674: Improve the docstring for __import__ (GH-5339) (GH-5494)Mariatta2018-02-021-4/+3
| | | | | | | | Clarify that the level argument is used to determine whether to perform absolute or relative imports: 0 is absolute, while a positive number is the number of parent directories to search relative to the current module.. (cherry picked from commit 461d225b195eec5269f317323b41115516144c41) Co-authored-by: oldk <oldk1331@users.noreply.github.com>
* [2.7] bpo-29526: Add reference to help('FORMATTING') in format() builtin ↵Serhiy Storchaka2017-09-111-1/+3
| | | | | (GH-166). (#3492) (cherry picked from commit 2e6bb4484ee1b0da67d1dfcf0816c58602daa5a0)
* bpo-23787: Change sum() docstring from sequence to iterable (GH-1859)Mariatta2017-06-061-3/+3
| | | | | * bpo-23787: Change sum() docstring from sequence to iterable Original patch by Raymond Hettinger.
* Issue #28139: Fix messed up indentationMartin Panter2016-09-171-34/+32
| | | | | Also update the classmethod and staticmethod doc strings and comments to match the RST documentation.
* Issue #26874: Simplify the divmod docstring.Zachary Ware2016-04-281-1/+1
| | | | Now it actually matches the prose docs.
* Issue #26874: Make divmod docstring and full doc matchZachary Ware2016-04-281-1/+1
|
* Issue #25678: Copy buffer objects to null-terminated strings.Serhiy Storchaka2015-11-201-5/+16
| | | | | | | | Avoid buffer overreads when int(), long(), float(), and compile() are passed buffer objects. Similar code is removed from the complex() constructor, where it was not reachable. Patch backported from issue #24802 by Eryk Sun.
* Issue #19362: Tweek len() doc and docstring to expand the indicated range ofTerry Jan Reedy2014-06-161-1/+1
| | | | arguments. Original patch by Gareth Rees.
* #18424: PEP8ify the tense of the sum docstring.R David Murray2013-07-101-2/+2
|
* #17178: update any()/all() docstrings to document their behavior with empty ↵Ezio Melotti2013-02-151-2/+4
| | | | iterables. Patch by Ankur Ankan.
* Issue #14783: Backport changes from 3.2.Chris Jerdonek2012-10-081-1/+2
|
* Issue #15741: Fix potential NULL dereference. Found by Coverity.Stefan Krah2012-08-201-0/+2
|
* Issue #15604: Update uses of PyObject_IsTrue() to check for and handle ↵Antoine Pitrou2012-08-151-6/+16
| | | | | | errors correctly. Patch by Serhiy Storchaka.
* Closes #9254: backport __import__ docstring/doc mentions of importlib.R David Murray2012-07-181-2/+6
| | | | Patch by Éric Araujo.
* Issue #8767: Restore building with --disable-unicode.Martin v. Löwis2012-05-201-0/+2
| | | | Original patch by Stefano Taschini.
* remove py3k warning for callableBenjamin Peterson2011-11-061-3/+0
|
* Improve docstring for divmod()Raymond Hettinger2011-07-191-1/+1
|
* Close #12501: Adjust callable() warning: callable() is only not supported inVictor Stinner2011-07-081-1/+1
| | | | Python 3.1. callable() is again supported in Python 3.2.
* 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)