Mark Dickinson
bd15a06fd3
Issue #7117 , continued: Change round implementation to use the 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.
17 years ago
Benjamin Peterson
0811a44cca
Merged revisions 76350 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r76350 | benjamin.peterson | 2009-11-17 15:24:54 -0600 (Tue, 17 Nov 2009) | 1 line
a better callable replacement
........
17 years ago
Benjamin Peterson
90ed611f6d
a better callable replacement
17 years ago
Mark Dickinson
f263724ea0
Issue #7070 : Fix problem with builtin round function for large odd
integer arguments. Also fixes the sign of round(-0.0).
17 years ago
Mark Dickinson
9acadc54e0
Merged revisions 75714 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75714 | mark.dickinson | 2009-10-26 14:18:44 +0000 (Mon, 26 Oct 2009) | 1 line
Warn against replacing PyNumber_Add with PyNumber_InPlaceAdd in sum
........
17 years ago
Mark Dickinson
0e0e215308
Warn against replacing PyNumber_Add with PyNumber_InPlaceAdd in sum
17 years ago
Skip Montanaro
ba1e0f46ab
Issue 7147 - remove ability to attempt to build Python without complex number support (was broken anyway)
17 years ago
Benjamin Peterson
d692a71fdd
revert r74699 since it loses useful error information
17 years ago
Benjamin Peterson
5515990ee1
PyObject_GetIter can set an error for its self just fine
17 years ago
Benjamin Peterson
c963731bb6
refactor logic a little when no sep or end is passed
17 years ago
Benjamin Peterson
7d6b01417f
Merged revisions 73776 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r73776 | benjamin.peterson | 2009-07-02 13:16:45 -0500 (Thu, 02 Jul 2009) | 1 line
when print() gets unicode arguments, sep and end should be unicode by default #4618
........
17 years ago
Benjamin Peterson
753d16234f
when print() gets unicode arguments, sep and end should be unicode by default #4618
17 years ago
Philip Jenvey
dd0388a1c2
further hint to where the open docs really are
17 years ago
Benjamin Peterson
4c1fe51ca0
don't ignore exceptions from _PyObject_LengthHint
17 years ago
Benjamin Peterson
8bc5b68159
these builtins have to be initialized
17 years ago
Mark Dickinson
1bdf7e9cab
Issue #1869 : Fix a couple of minor round() issues.
17 years ago
Antoine Pitrou
789be0c0a0
Issue #2396 : backport the memoryview object.
17 years ago
Benjamin Peterson
f5b52246ed
ignore the coding cookie in compile(), exec(), and eval() if the source is a string #4626
18 years ago
Raymond Hettinger
24e2872f0d
Issue 1242657: list(obj) can swallow KeyboardInterrupt
18 years ago
Raymond Hettinger
b516370bcb
Issue 1242657: list(obj) can swallow KeyboardInterrupt.
18 years ago
Mark Dickinson
e94c679df0
Issue #1717 : rename tp_compare to tp_reserved. I'll change the
type of tp_compare in a separate commit, for ease of reversion
should things go wrong.
18 years ago
Mark Dickinson
f02e0aaafd
Issue #1717 : remove the cmp builtin function, the C-API functions
PyObject_Cmp, PyObject_Compare, and various support functions.
18 years ago
Mark Dickinson
1124e71368
Issue #4707 : round(x, n) now returns an integer when x is an integer.
Previously it returned a float.
18 years ago
Amaury Forgeot d'Arc
f343e01c17
Merged revisions 68560 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68560 | amaury.forgeotdarc | 2009-01-13 00:36:55 +0100 (mar., 13 janv. 2009) | 6 lines
#3720 : Interpreter crashes when an evil iterator removes its own next function.
Now the slot is filled with a function that always raises.
Will not backport: extensions compiled with 2.6.x would not run on 2.6.0.
........
18 years ago
Raymond Hettinger
5d1ff00bc0
Mini-optimization: use pack/unpack functions for argument tuples.
18 years ago
Benjamin Peterson
3809026a72
#4826 exec() doesn't take a file object anymore
18 years ago
Georg Brandl
ced51db8cf
#4513 : remove traces of zip() docstring from when it was izip().
18 years ago
Christian Heimes
6a27efa2d3
Issue 3723: Fixed initialization of subinterpreters
The patch fixes several issues with Py_NewInterpreter as well as the demo for multiple subinterpreters.
Most of the patch was written by MvL with help from Benjamin, Amaury and me. Graham Dumpleton has verified that this patch fixes an issue with mod_wsgi.
18 years ago
Martin v. Löwis
04dc25c537
Issue #3187 : Add sys.setfilesystemencoding.
18 years ago
Amaury Forgeot d'Arc
d0db98fcd8
#1688 : On Windows, the input() prompt was not correctly displayed if it
contains non-ascii characters.
Reviewed by Benjamin Peterson.
18 years ago
Georg Brandl
2cabc56296
#3706 : fix error message for wrong exec() argument type. R=Guido.
18 years ago
Benjamin Peterson
08336e30ad
follup to #3473 : don't duplicate the reduce code
18 years ago
Marc-André Lemburg
4cc0f24857
Rename PyUnicode_AsString -> _PyUnicode_AsString and
PyUnicode_AsStringAndSize -> _PyUnicode_AsStringAndSize to mark
them for interpreter internal use only.
We'll have to rework these APIs or create new ones for the
purpose of accessing the UTF-8 representation of Unicode objects
for 3.1.
18 years ago
Amaury Forgeot d'Arc
7888d0803d
Merged revisions 65339-65340,65342 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r65339 | amaury.forgeotdarc | 2008-07-31 23:28:03 +0200 (jeu., 31 juil. 2008) | 5 lines
#3479 : unichr(2**32) used to return u'\x00'.
The argument was fetched in a long, but PyUnicode_FromOrdinal takes an int.
(why doesn't gcc issue a truncation warning in this case?)
........
r65340 | amaury.forgeotdarc | 2008-07-31 23:35:03 +0200 (jeu., 31 juil. 2008) | 2 lines
Remove a dummy test that was checked in by mistake
........
r65342 | amaury.forgeotdarc | 2008-08-01 01:39:05 +0200 (ven., 01 août 2008) | 8 lines
Correct a crash when two successive unicode allocations fail with a MemoryError:
the freelist contained half-initialized objects with freed pointers.
The comment
/* XXX UNREF/NEWREF interface should be more symmetrical */
was copied from tupleobject.c, and appears in some other places.
I sign the petition.
........
18 years ago
Amaury Forgeot d'Arc
39fd672dfe
#3479 : unichr(2**32) used to return u'\x00'.
The argument was fetched in a long, but PyUnicode_FromOrdinal takes an int.
(why doesn't gcc issue a truncation warning in this case?)
18 years ago
Mark Dickinson
0d748c2fa4
Docstring typo
18 years ago
Georg Brandl
809ddaaafb
#3191 : fix round() docs and docstring.
18 years ago
Raymond Hettinger
9c437af4eb
Revert 64424, 64438, and 64439.
18 years ago
Raymond Hettinger
e3ae655edf
Make bin() implementation parallel oct() and hex() so that int/long subclasses can override or so that other classes can support.
18 years ago
Georg Brandl
559e5d7f4d
#2630 : Implement PEP 3138.
The repr() of a string now contains printable Unicode characters unescaped.
The new ascii() builtin can be used to get a repr() with only ASCII characters in it.
PEP and patch were written by Atsuo Ishimoto.
18 years ago
Gregory P. Smith
9d53457e59
Merge in release25-maint r60793:
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.
18 years ago
Martin v. Löwis
1a21451b1d
Implement PEP 3121: new module initialization and finalization API.
18 years ago
Georg Brandl
f08a9ddcb7
Merged revisions 63724,63726,63732,63744,63754-63755,63757-63758,63760,63775,63781-63782,63787,63805-63808,63818-63819,63823-63824 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r63724 | gregory.p.smith | 2008-05-26 22:22:14 +0200 (Mon, 26 May 2008) | 6 lines
Fixes issue2791: subprocess.Popen.communicate leaked a file descripton until
the last reference to the Popen instance was dropped. Adding explicit
close() calls fixes it.
Candidate for backport to release25-maint.
........
r63726 | benjamin.peterson | 2008-05-26 22:43:24 +0200 (Mon, 26 May 2008) | 2 lines
fix minor grammar typo
........
r63732 | benjamin.peterson | 2008-05-26 23:44:26 +0200 (Mon, 26 May 2008) | 2 lines
remove duplication in test module
........
r63744 | lars.gustaebel | 2008-05-27 14:39:23 +0200 (Tue, 27 May 2008) | 3 lines
Do not close external file objects passed to tarfile.open(mode='w:bz2')
when the TarFile is closed.
........
r63754 | benjamin.peterson | 2008-05-28 03:12:35 +0200 (Wed, 28 May 2008) | 2 lines
update tutorial function with more appropiate one from Eric Smith
........
r63755 | mark.hammond | 2008-05-28 03:54:55 +0200 (Wed, 28 May 2008) | 2 lines
bdist_wininst now works correctly when both --skip-build and --plat-name are specified.
........
r63757 | georg.brandl | 2008-05-28 13:21:39 +0200 (Wed, 28 May 2008) | 2 lines
#2989 : add PyType_Modified().
........
r63758 | benjamin.peterson | 2008-05-28 13:51:41 +0200 (Wed, 28 May 2008) | 2 lines
fix spelling
........
r63760 | georg.brandl | 2008-05-28 17:41:36 +0200 (Wed, 28 May 2008) | 2 lines
#2990 : prevent inconsistent state while updating method cache.
........
r63775 | georg.brandl | 2008-05-29 09:18:17 +0200 (Thu, 29 May 2008) | 2 lines
Two fixes in bytearray docs.
........
r63781 | georg.brandl | 2008-05-29 09:38:37 +0200 (Thu, 29 May 2008) | 2 lines
#2988 : add note about catching CookieError when parsing untrusted cookie data.
........
r63782 | georg.brandl | 2008-05-29 09:45:26 +0200 (Thu, 29 May 2008) | 2 lines
#2985 : allow i8 in XMLRPC responses.
........
r63787 | georg.brandl | 2008-05-29 16:35:39 +0200 (Thu, 29 May 2008) | 2 lines
Revert #2990 patch; it's not necessary as Armin showed.
........
r63805 | raymond.hettinger | 2008-05-30 08:37:27 +0200 (Fri, 30 May 2008) | 1 line
Issue 2784: fix leaks in exception exit.
........
r63806 | raymond.hettinger | 2008-05-30 08:49:47 +0200 (Fri, 30 May 2008) | 1 line
Issue 2855: Fix obscure crasher by slowing down the entire module. Mimics what was done to dictionaries in r59223.
........
r63807 | raymond.hettinger | 2008-05-30 09:16:53 +0200 (Fri, 30 May 2008) | 1 line
Issue 2903: Add __name__ in globals for namedtuple namespace.
........
r63808 | georg.brandl | 2008-05-30 09:54:16 +0200 (Fri, 30 May 2008) | 2 lines
#2999 : fix name of third parameter in unicode.replace()'s docstring.
........
r63818 | georg.brandl | 2008-05-30 21:12:13 +0200 (Fri, 30 May 2008) | 2 lines
getloadavg() is not available on Windows.
........
r63819 | georg.brandl | 2008-05-30 21:17:29 +0200 (Fri, 30 May 2008) | 2 lines
Better quote with single quotes.
........
r63823 | benjamin.peterson | 2008-05-30 22:44:39 +0200 (Fri, 30 May 2008) | 2 lines
fix grammar
........
r63824 | marc-andre.lemburg | 2008-05-30 22:52:18 +0200 (Fri, 30 May 2008) | 5 lines
Update the locale module alias table.
Closes #3011 .
........
18 years ago
Gregory P. Smith
dd96db63f6
This reverts r63675 based on the discussion in this thread:
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.
18 years ago
Georg Brandl
a26f8ca668
Revert r63934 -- it was mixing two patches.
18 years ago
Georg Brandl
f954c4b9fb
Remove meaning of -ttt, but still accept -t option on cmdline for compatibility.
18 years ago
Raymond Hettinger
65856600ed
Issue 2784: fix leaks in exception exit.
18 years ago
Christian Heimes
72b710a596
Renamed PyString to PyBytes
18 years ago
Christian Heimes
9c4756ea26
Renamed PyBytes to PyByteArray
18 years ago
Christian Heimes
593daf545b
Renamed PyString to PyBytes
18 years ago