Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Issue #5793: rationalize isdigit / isalpha / tolower, etc. Will port to ↵ | Eric Smith | 2009-04-27 | 3 | -266/+44 |
| | | | | py3k. Should fix Windows buildbot errors. | ||||
* | Backport r71967 changes from py3k to trunk. | Mark Dickinson | 2009-04-26 | 1 | -60/+21 |
| | | | | (Internal plumbing changes for float parsing.) | ||||
* | Reset errno before both calls to PyOS_ascii_strtod, not just one. | Mark Dickinson | 2009-04-26 | 1 | -2/+2 |
| | |||||
* | Issue #4971: Fix titlecase for characters that are their own | Martin v. Löwis | 2009-04-26 | 1 | -6/+1 |
| | | | | titlecase, but not their own uppercase. | ||||
* | Issue #5835, deprecate PyOS_ascii_formatd. | Eric Smith | 2009-04-25 | 3 | -19/+10 |
| | | | | | | If anyone wants to clean up the documentation, feel free. It's my first documentation foray, and it's not that great. Will port to py3k with a different strategy. | ||||
* | Issue #5828 (Invalid behavior of unicode.lower): Fixed bogus logic in | Walter Dörwald | 2009-04-25 | 1 | -2/+2 |
| | | | | | makeunicodedata.py and regenerated the Unicode database (This fixes u'\u1d79'.lower() == '\x00'). | ||||
* | Fix typo in complex parsing code; expand tests. | Mark Dickinson | 2009-04-25 | 1 | -1/+1 |
| | |||||
* | fix a segfault when setting __class__ in __del__ #5283 | Benjamin Peterson | 2009-04-25 | 1 | -0/+6 |
| | |||||
* | Fix missing 'return NULL' | Mark Dickinson | 2009-04-24 | 1 | -1/+1 |
| | |||||
* | Issue #5816: | Mark Dickinson | 2009-04-24 | 1 | -164/+158 |
| | | | | | | | | - simplify parsing and printing of complex numbers - make complex(repr(z)) round-tripping work for complex numbers involving nans, infs, or negative zeros - don't accept some of the stranger complex strings that were previously allowed---e.g., complex('1..1j') | ||||
* | Fixed issue 5782: formatting with commas didn't work if no specifier type ↵ | Eric Smith | 2009-04-22 | 1 | -0/+1 |
| | | | | code was given. | ||||
* | Backport of some of the work in r71665 to trunk. This reworks much of | Eric Smith | 2009-04-22 | 3 | -443/+676 |
| | | | | | | | | | | | | | | | | | | | | | int, long, and float __format__(), and it keeps their implementation in sync with py3k. Also added PyOS_double_to_string. This is the "fallback" version that's also available in trunk, and should be kept in sync with that code. I'll add an issue to document PyOS_double_to_string in the C API. There are many internal cleanups. Externally visible changes include: - Implement PEP 378, Format Specifier for Thousands Separator, for floats, ints, and longs. - Issue #5515: 'n' formatting for ints, longs, and floats handles leading zero formatting poorly. - Issue #5772: For float.__format__, don't add a trailing ".0" if we're using no type code and we have an exponent. | ||||
* | Issue #3166: Make long -> float (and int -> float) conversions | Mark Dickinson | 2009-04-20 | 2 | -27/+220 |
| | | | | | | correctly rounded, using round-half-to-even. This ensures that the value of float(n) doesn't depend on whether we're using 15-bit digits or 30-bit digits for Python longs. | ||||
* | make errors consistent | Benjamin Peterson | 2009-04-19 | 1 | -2/+2 |
| | |||||
* | initialize weakref some weakref types | Benjamin Peterson | 2009-04-19 | 1 | -0/+6 |
| | |||||
* | many more types to initialize (I had to expose some of them) | Benjamin Peterson | 2009-04-18 | 3 | -6/+48 |
| | |||||
* | initalize -> initialize | Benjamin Peterson | 2009-04-18 | 1 | -4/+4 |
| | |||||
* | try to initalize all builtin types with PyType_Ready to avoid problems like ↵ | Benjamin Peterson | 2009-04-18 | 2 | -16/+68 |
| | | | | #5787 | ||||
* | rename internal bytes_ functions to bytearray | Benjamin Peterson | 2009-04-18 | 1 | -153/+153 |
| | |||||
* | "not subscriptable" should be a bit more understandable than "unsubscriptable". | Georg Brandl | 2009-04-18 | 1 | -1/+1 |
| | |||||
* | call __float__ on str subclasses #5759 | Benjamin Peterson | 2009-04-15 | 1 | -1/+3 |
| | | | | tests by R. David Murray | ||||
* | Fixed incorrect object passed into format_float_internal(). This was ↵ | Eric Smith | 2009-04-13 | 1 | -1/+1 |
| | | | | resulting in a conversion being done twice. | ||||
* | Whitespace normalization. | Georg Brandl | 2009-04-05 | 1 | -8/+8 |
| | |||||
* | #5615: make it possible to configure --without-threads again. | Georg Brandl | 2009-04-05 | 1 | -0/+6 |
| | |||||
* | Issue #2396: backport the memoryview object. | Antoine Pitrou | 2009-04-02 | 3 | -4/+842 |
| | |||||
* | sys.long_info attributes should be ints, not longs | Mark Dickinson | 2009-04-02 | 1 | -2/+4 |
| | |||||
* | Fix a wrong struct field assignment (docstring as closure). | Georg Brandl | 2009-03-31 | 1 | -1/+1 |
| | |||||
* | Issue #532631: Apply floatformat changes to unicodeobject.c | Mark Dickinson | 2009-03-29 | 1 | -0/+9 |
| | | | | as well as stringobject.c. | ||||
* | Issue #532631: Add paranoid check to avoid potential buffer overflow | Mark Dickinson | 2009-03-29 | 1 | -1/+10 |
| | | | | on systems with sizeof(int) > 4. | ||||
* | Issue #532631: Replace confusing fabs(x)/1e25 >= 1e25 test | Mark Dickinson | 2009-03-29 | 3 | -3/+3 |
| | | | | with fabs(x) >= 1e50, and fix documentation. | ||||
* | The tracking statistics were actually too pessimistic | Antoine Pitrou | 2009-03-23 | 2 | -3/+4 |
| | |||||
* | Issue #4688: Add a heuristic so that tuples and dicts containing only | Antoine Pitrou | 2009-03-23 | 2 | -1/+135 |
| | | | | | | | | | untrackable objects are not tracked by the garbage collector. This can reduce the size of collections and therefore the garbage collection overhead on long-running programs, depending on their particular use of datatypes. (trivia: this makes the "binary_trees" benchmark from the Computer Language Shootout 40% faster) | ||||
* | Issue #5512: speed up the long division algorithm for Python longs. | Mark Dickinson | 2009-03-23 | 1 | -94/+152 |
| | | | | | | | | | | | | | | | The basic algorithm remains the same; the most significant speedups come from the following three changes: (1) normalize by shifting instead of multiplying and dividing (2) the old algorithm usually did an unnecessary extra iteration of the outer loop; remove this. As a special case, this means that long divisions with a single-digit result run twice as fast as before. (3) make inner loop much tighter. Various benchmarks show speedups of between 50% and 150% for long integer divisions and modulo operations. | ||||
* | There is no macro named SIZEOF_SSIZE_T. Should use SIZEOF_SIZE_T instead. | Hirokazu Yamamoto | 2009-03-21 | 1 | -1/+1 |
| | |||||
* | Issue #4258: Use 30-bit digits for Python longs, on 64-bit platforms. | Mark Dickinson | 2009-03-20 | 1 | -0/+49 |
| | | | | Backport of r70459. | ||||
* | fix strange errors when setting attributes on tracebacks #4034 | Benjamin Peterson | 2009-03-18 | 1 | -1/+11 |
| | |||||
* | Issue 4474: On platforms with sizeof(wchar_t) == 4 and | Mark Dickinson | 2009-03-18 | 1 | -0/+58 |
| | | | | | | | | | sizeof(Py_UNICODE) == 2, PyUnicode_FromWideChar now converts each character outside the BMP to the appropriate surrogate pair. Thanks Victor Stinner for the patch. (backport of r70452 from py3k to trunk) | ||||
* | Fix a small nit in the error message if bool() falls back on __len__ and it ↵ | Georg Brandl | 2009-03-15 | 1 | -1/+5 |
| | | | | returns the wrong type: it would tell the user that __nonzero__ should return bool or int. | ||||
* | fix tuple.index() error message #5495 | Benjamin Peterson | 2009-03-15 | 1 | -1/+1 |
| | |||||
* | Issue 5237, Allow auto-numbered replacement fields in str.format() strings. | Eric Smith | 2009-03-14 | 1 | -44/+129 |
| | | | | | | | | | | | | | | | | | For simple uses for str.format(), this makes the typing easier. Hopfully this will help in the adoption of str.format(). For example: 'The {} is {}'.format('sky', 'blue') You can mix and matcth auto-numbering and named replacement fields: 'The {} is {color}'.format('sky', color='blue') But you can't mix and match auto-numbering and specified numbering: 'The {0} is {}'.format('sky', 'blue') ValueError: cannot switch from manual field specification to automatic field numbering Will port to 3.1. | ||||
* | fix funky indentation | Benjamin Peterson | 2009-03-08 | 1 | -4/+4 |
| | |||||
* | Fixed memory leak on failure. | Hirokazu Yamamoto | 2009-03-05 | 1 | -1/+1 |
| | |||||
* | Replace long with twodigits, to avoid depending | Mark Dickinson | 2009-02-25 | 1 | -1/+1 |
| | | | | on sizeof(digit) < sizeof(long) | ||||
* | Issue #5341: Fix a variety of spelling errors. | Mark Dickinson | 2009-02-21 | 4 | -4/+4 |
| | |||||
* | Issue #5247: Improve error message when unknown format codes are used when ↵ | Eric Smith | 2009-02-20 | 1 | -17/+31 |
| | | | | using str.format() with str, unicode, long, int, and float arguments. | ||||
* | A few more minor fixes in longobject.c | Mark Dickinson | 2009-02-15 | 1 | -5/+4 |
| | |||||
* | Issue #5260: Various portability and standards compliance fixes, optimizations | Mark Dickinson | 2009-02-15 | 1 | -46/+35 |
| | | | | | | | and cleanups in Objects/longobject.c. The most significant change is that longs now use less memory: average savings are 2 bytes per long on 32-bit systems and 6 bytes per long on 64-bit systems. (This memory saving already exists in py3k.) | ||||
* | Fix compiler warning (gcc) | Antoine Pitrou | 2009-02-13 | 1 | -1/+1 |
| | |||||
* | Issue #5186: Reduce hash collisions for objects with no __hash__ method by | Antoine Pitrou | 2009-02-13 | 1 | -15/+7 |
| | | | | rotating the object pointer by 4 bits to the right. | ||||
* | Fix warnings GCC emits where the argument of PyErr_Format is a single variable. | Georg Brandl | 2009-02-13 | 1 | -3/+3 |
| |