Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Issue #8748: Fix incorrect results from comparisons between an integer | Mark Dickinson | 2010-05-30 | 1 | -9/+54 |
| | | | | and a complex instance. Based on a patch by Meador Inge. | ||||
* | Remove declaration for unused variable. | Mark Dickinson | 2010-05-30 | 1 | -1/+0 |
| | |||||
* | Issue #5211: Complete removal of implicit coercions for the complex | Mark Dickinson | 2010-05-30 | 1 | -19/+2 |
| | | | | | type. Coercion for arithmetic operations was already removed in r78280, but that commit didn't remove coercion for rich comparisons. | ||||
* | Untabify C files. Will watch buildbots. | Antoine Pitrou | 2010-05-09 | 1 | -971/+971 |
| | |||||
* | #7482: clarify error message in case of division by zero of float and ↵ | Ezio Melotti | 2010-02-22 | 1 | -2/+2 |
| | | | | complex numbers. | ||||
* | Issue #5211: Fix complex type to avoid implicit calls to | Mark Dickinson | 2010-02-21 | 1 | -26/+45 |
| | | | | complex.__coerce__. Thanks Meador Inge for the patch. | ||||
* | factor out __complex__ lookup code to fix another case | Benjamin Peterson | 2010-01-04 | 1 | -50/+44 |
| | |||||
* | do correct lookup of the __complex__ method | Benjamin Peterson | 2010-01-04 | 1 | -8/+14 |
| | |||||
* | Include ieeefp.h (when available) in pyport.h instead of individually in | Mark Dickinson | 2009-11-28 | 1 | -4/+0 |
| | | | | | | Objects/floatobject.c and Objects/complexobject.c. This should silence compiler warnings about implicit declaration of the 'finite' function on Solaris. | ||||
* | Issue #7117: Use PyOS_string_to_double instead of PyOS_ascii_strtod in | Mark Dickinson | 2009-10-26 | 1 | -16/+29 |
| | | | | | complexobject.c. Also remove length restriction on unicode inputs to the complex constructor. | ||||
* | Issue #5829: don't raise OverflowError for complex('1e500'). Backport of ↵ | Mark Dickinson | 2009-05-20 | 1 | -9/+0 |
| | | | | r72803. | ||||
* | Issue #6044: remove confusing wording from complex -> integer and | Mark Dickinson | 2009-05-17 | 1 | -3/+3 |
| | | | | complex -> float conversion error messages. | ||||
* | Issue #5920: Changed format.__float__ and complex.__float__ to use a ↵ | Eric Smith | 2009-05-05 | 1 | -7/+10 |
| | | | | precision of 12 when using the empty presentation type. This more closely matches str()'s behavior and reduces surprises when adding alignment flags to an empty format string. Patch by Mark Dickinson. | ||||
* | Eliminate some locale-dependent calls to isspace and tolower. | Mark Dickinson | 2009-05-03 | 1 | -4/+4 |
| | |||||
* | Issue #1588: Add complex.__format__. | Eric Smith | 2009-04-30 | 1 | -0/+37 |
| | |||||
* | Reset errno before both calls to PyOS_ascii_strtod, not just one. | Mark Dickinson | 2009-04-26 | 1 | -2/+2 |
| | |||||
* | Fix typo in complex parsing code; expand tests. | Mark Dickinson | 2009-04-25 | 1 | -1/+1 |
| | |||||
* | 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') | ||||
* | This reverts r63675 based on the discussion in this thread: | Gregory P. Smith | 2008-06-09 | 1 | -9/+9 |
| | | | | | | | 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. | ||||
* | Fixed complex.__getnewargs__() to not emit another complex object. | Alexandre Vassalotti | 2008-06-04 | 1 | -1/+2 |
| | |||||
* | Renamed PyString to PyBytes | Christian Heimes | 2008-05-26 | 1 | -9/+9 |
| | |||||
* | I finally got the time to update and merge Mark's and my trunk-math branch. ↵ | Christian Heimes | 2008-04-18 | 1 | -3/+62 |
| | | | | | | The patch is collaborated work of Mark Dickinson and me. It was mostly done a few months ago. The patch fixes a lot of loose ends and edge cases related to operations with NaN, INF, very small values and complex math. The patch also adds acosh, asinh, atanh, log1p and copysign to all platforms. Finally it fixes differences between platforms like different results or exceptions for edge cases. Have fun :) | ||||
* | Fix compiler warning about finite() missing on Solaris. | Neal Norwitz | 2008-03-28 | 1 | -0/+4 |
| | |||||
* | Fixed repr() and str() of complex numbers. Complex suffered from the same ↵ | Christian Heimes | 2008-02-15 | 1 | -7/+40 |
| | | | | problem as floats but I forgot to test and fix them. | ||||
* | static PyObject* variables should use PyString_InternFromString() instead of ↵ | Christian Heimes | 2008-01-28 | 1 | -6/+7 |
| | | | | PyObject_FromString() to store a python string in a function level static var. | ||||
* | Indentation normalization. | Georg Brandl | 2008-01-19 | 1 | -8/+8 |
| | |||||
* | Backport PEP 3141 from the py3k branch to the trunk. This includes r50877 (just | Jeffrey Yasskin | 2008-01-03 | 1 | -6/+54 |
| | | | | | | | 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. | ||||
* | Shut up a compiler warning. | Guido van Rossum | 2007-12-03 | 1 | -0/+1 |
| | |||||
* | Patch # 1507 by Mark Dickinson. Make complex(x, -0) retain the sign of | Guido van Rossum | 2007-11-27 | 1 | -9/+15 |
| | | | | | the imaginary part (as long as it's not complex). Backport candidate? | ||||
* | Add a bunch of GIL release/acquire points in tp_print implementations and for | Brett Cannon | 2007-09-17 | 1 | -0/+2 |
| | | | | | | PyObject_Print(). Closes issue #1164. | ||||
* | PEP 3123: Provide forward compatibility with Python 3.0, while keeping | Martin v. Löwis | 2007-07-21 | 1 | -2/+1 |
| | | | | | backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT. | ||||
* | Patch #1675423: PyComplex_AsCComplex() now tries to convert an object | Georg Brandl | 2007-03-17 | 1 | -1/+48 |
| | | | | | | | to complex using its __complex__() method before falling back to the __float__() method. Therefore, the functions in the cmath module now can operate on objects that define a __complex__() method. (backport) | ||||
* | Patch #1642844: comments to clarify the complexobject constructor. | Georg Brandl | 2007-03-13 | 1 | -4/+25 |
| | |||||
* | Patch #1491866: change the complex() constructor to allow parthensized ↵ | Collin Winter | 2007-03-09 | 1 | -5/+25 |
| | | | | forms. This means complex(repr(x)) now works instead of raising a ValueError. | ||||
* | Fix SF #1676971, Complex OverflowError has a typo | Neal Norwitz | 2007-03-09 | 1 | -1/+1 |
| | |||||
* | Use sizeof(buffer) instead of duplicating the constants to ensure they won't | Neal Norwitz | 2006-07-16 | 1 | -7/+7 |
| | | | | | | | | | be wrong. The real change is to pass (bufsz - 1) to PyOS_ascii_formatd and 1 to strncat. strncat copies n+1 bytes from src (not dest). Reported by Klocwork #58. | ||||
* | Correctly allocate complex types with tp_alloc. (bug #1498638) | Georg Brandl | 2006-06-01 | 1 | -2/+2 |
| | |||||
* | C++ compiler cleanup: bunch-o-casts, plus use of unsigned loop index var in ↵ | Skip Montanaro | 2006-04-18 | 1 | -1/+1 |
| | | | | a couple places | ||||
* | Remove unnecessary casts in type object initializers. | Georg Brandl | 2006-03-30 | 1 | -5/+5 |
| | |||||
* | Revert backwards-incompatible const changes. | Martin v. Löwis | 2006-02-27 | 1 | -1/+1 |
| | |||||
* | Merge ssize_t branch. | Martin v. Löwis | 2006-02-15 | 1 | -2/+2 |
| | |||||
* | Add const to several API functions that take char *. | Jeremy Hylton | 2005-12-10 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | In C++, it's an error to pass a string literal to a char* function without a const_cast(). Rather than require every C++ extension module to put a cast around string literals, fix the API to state the const-ness. I focused on parts of the API where people usually pass literals: PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type slots, etc. Predictably, there were a large set of functions that needed to be fixed as a result of these changes. The most pervasive change was to make the keyword args list passed to PyArg_ParseTupleAndKewords() to be a const char *kwlist[]. One cast was required as a result of the changes: A type object mallocs the memory for its tp_doc slot and later frees it. PyTypeObject says that tp_doc is const char *; but if the type was created by type_new(), we know it is safe to cast to char *. | ||||
* | patch [ 1118729 ] Error in representation of complex numbers(again) | Georg Brandl | 2005-09-16 | 1 | -6/+3 |
| | |||||
* | Bug #1079011: Incorrect error message (somewhat) | Raymond Hettinger | 2004-12-19 | 1 | -1/+1 |
| | |||||
* | Fix repr for negative imaginary part. Fixes #1013908. | Martin v. Löwis | 2004-08-22 | 1 | -2/+6 |
| | |||||
* | Patch #774665: Make Python LC_NUMERIC agnostic. | Martin v. Löwis | 2004-06-08 | 1 | -9/+14 |
| | |||||
* | Simplify and speedup uses of Py_BuildValue(): | Raymond Hettinger | 2003-10-12 | 1 | -2/+2 |
| | | | | | | * Py_BuildValue("(OOO)",a,b,c) --> PyTuple_Pack(3,a,b,c) * Py_BuildValue("()",a) --> PyTuple_New(0) * Py_BuildValue("O", a) --> Py_INCREF(a) | ||||
* | Remove 'e.g.' from error message | Raymond Hettinger | 2003-08-30 | 1 | -3/+3 |
| | |||||
* | complex_new(): This could leak when the argument was neither string nor | Tim Peters | 2003-08-15 | 1 | -0/+3 |
| | | | | | | number. This accounts for the 2 refcount leaks per test_complex run Michael Hudson discovered (I figured only I would have the stomach to look for leaks in floating-point code <wink>). |