Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add rational.Rational as an implementation of numbers.Rational with infinite | Jeffrey Yasskin | 2008-01-15 | 1 | -0/+279 |
| | | | | | | | | | | | | | precision. This has been discussed at http://bugs.python.org/issue1682. It's useful primarily for teaching, but it also demonstrates how to implement a member of the numeric tower, including fallbacks for mixed-mode arithmetic. I expect to write a couple more patches in this area: * Rational.from_decimal() * Rational.trim/approximate() (maybe with different names) * Maybe remove the parentheses from Rational.__str__() * Maybe rename one of the Rational classes * Maybe make Rational('3/2') work. | ||||
* | Temporarily revert 59967 until GC can be added. | Raymond Hettinger | 2008-01-15 | 1 | -6/+0 |
| | |||||
* | Issue 1820: structseq objects did not work with the % formatting operator ↵ | Raymond Hettinger | 2008-01-15 | 1 | -0/+6 |
| | | | | | | or isinstance(t, tuple). Orignal patch (without tests) by Leif Walsh. | ||||
* | Typo fixes | Andrew M. Kuchling | 2008-01-15 | 1 | -1/+1 |
| | |||||
* | Now that I've learnt about structseq objects I felt like converting ↵ | Christian Heimes | 2008-01-14 | 1 | -1/+1 |
| | | | | | | sys.float_info to a structseq. It's readonly and help(sys.float_info) explains the attributes nicely. | ||||
* | Applied patch #1816: sys.flags patch | Christian Heimes | 2008-01-14 | 1 | -0/+12 |
| | |||||
* | Added new an better structseq representation. E.g. repr(time.gmtime(0)) now ↵ | Christian Heimes | 2008-01-14 | 1 | -1/+5 |
| | | | | returns 'time.struct_time(tm_year=1970, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=3, tm_yday=1, tm_isdst=0)' instead of '(1970, 1, 1, 0, 0, 0, 3, 1, 0)'. The feature is part of #1816: sys.flags | ||||
* | Issue 1780: Allow leading and trailing whitespace in Decimal constructor, | Mark Dickinson | 2008-01-12 | 1 | -0/+8 |
| | | | | | when constructing from a string. Disallow trailing newlines in Context.create_decimal. | ||||
* | Doctest results return a named tuple for readability | Raymond Hettinger | 2008-01-11 | 1 | -58/+58 |
| | |||||
* | Run doctests on the collections module | Raymond Hettinger | 2008-01-11 | 1 | -2/+4 |
| | |||||
* | Closing issue1761. | Amaury Forgeot d'Arc | 2008-01-10 | 1 | -0/+12 |
| | | | | | | | | | | | | Surprising behaviour of the "$" regexp: it matches the end of the string, AND just before the newline at the end of the string:: re.sub('$', '#', 'foo\n') == 'foo#\n#' Python is consistent with Perl and the pcre library, so we just document it. Guido prefers "\Z" to match only the end of the string. | ||||
* | Fixed #1776. __import__() no longer imports modules by file name | Christian Heimes | 2008-01-09 | 1 | -1/+11 |
| | |||||
* | Added __enter__ and __exit__ functions to HKEY object | Christian Heimes | 2008-01-08 | 1 | -20/+25 |
| | | | | Added ExpandEnvironmentStrings to the _winreg module. | ||||
* | Patch 1137: allow assigning to .buffer_size attribute of PyExpat.parser objects | Andrew M. Kuchling | 2008-01-08 | 1 | -2/+128 |
| | |||||
* | Issue #1757: The hash of a Decimal instance is no longer affected | Facundo Batista | 2008-01-08 | 1 | -0/+17 |
| | | | | by the current context. Thanks Mark Dickinson. | ||||
* | It's verbose, not debug | Christian Heimes | 2008-01-08 | 1 | -1/+1 |
| | |||||
* | Fixed indention problem that caused the second TIPC test to run on systems ↵ | Christian Heimes | 2008-01-07 | 1 | -1/+1 |
| | | | | without TIPC | ||||
* | #467924, patch by Alan McIntyre: Add ZipFile.extract and ZipFile.extractall. | Georg Brandl | 2008-01-07 | 1 | -0/+56 |
| | |||||
* | Issue #1646: Make socket support TIPC. The socket module now has support | Christian Heimes | 2008-01-07 | 1 | -0/+82 |
| | | | | | for TIPC under Linux, see http://tipc.sf.net/ for more information. Thanks to Alberto Bertogli for the patch | ||||
* | Fix issue 1747: allow classic classes to be checked for being subclasses of | Jeffrey Yasskin | 2008-01-07 | 1 | -4/+11 |
| | | | | ABCs. | ||||
* | #1325: Add docs and tests for zipimporter.archive and zipimporter.prefix. | Georg Brandl | 2008-01-06 | 1 | -0/+5 |
| | |||||
* | #1742: don't raise exception on os.path.relpath("a", "a"), but return os.curdir. | Georg Brandl | 2008-01-06 | 2 | -0/+2 |
| | | | | Reported by Jesse Towner. | ||||
* | Patch #1637: fix urlparse for URLs like 'http://x.com?arg=/foo'. | Guido van Rossum | 2008-01-05 | 1 | -0/+5 |
| | | | | Fix by John Nagle. | ||||
* | Doc patch #1730 from Robin Stocker; minor corrections mostly to os.rst. | Georg Brandl | 2008-01-05 | 1 | -1/+1 |
| | |||||
* | Fix comment typo | Andrew M. Kuchling | 2008-01-05 | 1 | -1/+1 |
| | |||||
* | Continue rolling back pep-3141 changes that changed behavior from 2.5. This | Jeffrey Yasskin | 2008-01-05 | 3 | -20/+16 |
| | | | | | | | | | | | | 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. | ||||
* | clean up a comment | Fred Drake | 2008-01-05 | 1 | -2/+2 |
| | |||||
* | Add error-checking to namedtuple's _replace() method. | Raymond Hettinger | 2008-01-05 | 1 | -0/+7 |
| | |||||
* | Improve namedtuple's _cast() method with a docstring, new name, and ↵ | Raymond Hettinger | 2008-01-05 | 1 | -4/+7 |
| | | | | error-checking. | ||||
* | Patch #1698 by Senthil: allow '@' in username when parsed by urlparse.py. | Guido van Rossum | 2008-01-05 | 1 | -0/+18 |
| | |||||
* | Patch #1725 by Mark Dickinson, fixes incorrect conversion of -1e1000 | Guido van Rossum | 2008-01-05 | 2 | -0/+13 |
| | | | | and adds errors for -0x. | ||||
* | socket.ioctl is only available on Windows | Christian Heimes | 2008-01-04 | 1 | -0/+10 |
| | |||||
* | Issue #1735: TarFile.extractall() now correctly sets | Lars Gustäbel | 2008-01-04 | 1 | -0/+17 |
| | | | | | | directory permissions and times. (will backport to 2.5) | ||||
* | Make math.{floor,ceil}({int,long}) return float again for backwards | Jeffrey Yasskin | 2008-01-04 | 1 | -0/+8 |
| | | | | compatibility after r59671 made them return integral types. | ||||
* | Minor fix-ups to named tuples: | Raymond Hettinger | 2008-01-04 | 1 | -8/+1 |
| | | | | | | | | | * Make the _replace() method respect subclassing. * Using property() to make _fields read-only wasn't a good idea. It caused len(Point._fields) to fail. * Add note to _cast() about length checking and alternative with the star-operator. | ||||
* | Added _struct._clearcache() for regression tests | Christian Heimes | 2008-01-04 | 1 | -0/+1 |
| | |||||
* | Fixed refleak tests for _struct changes | Christian Heimes | 2008-01-04 | 1 | -1/+0 |
| | |||||
* | Bug #1481296: Fixed long(float('nan'))!=0L. | Christian Heimes | 2008-01-04 | 1 | -0/+4 |
| | |||||
* | Added copysign(x, y) function to the math module | Christian Heimes | 2008-01-03 | 1 | -0/+7 |
| | |||||
* | Added math.isinf() and math.isnan() | Christian Heimes | 2008-01-03 | 1 | -0/+16 |
| | |||||
* | Issue #1700, reported by Nguyen Quan Son, fix by Fredruk Lundh: | Guido van Rossum | 2008-01-03 | 1 | -0/+30 |
| | | | | | Regular Expression inline flags not handled correctly for some unicode characters. (Forward port from 2.5.2.) | ||||
* | Backport PEP 3141 from the py3k branch to the trunk. This includes r50877 (just | Jeffrey Yasskin | 2008-01-03 | 5 | -3/+187 |
| | | | | | | | 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. | ||||
* | Change docstrings to comments so test output will display normally. | Kurt B. Kaiser | 2008-01-02 | 1 | -3/+3 |
| | |||||
* | Issue1177 | Kurt B. Kaiser | 2008-01-02 | 1 | -0/+13 |
| | | | | | | | r58207 and r58247 patch logic is reversed. I noticed this when I tried to use urllib to retrieve a file which required auth. Fix that and add a test for 401 error to verify. | ||||
* | Remove a straggling debugging print line. | Brett Cannon | 2007-12-25 | 1 | -1/+0 |
| | |||||
* | Actually execute the tests for the getter/setter/deleter tests on properties. | Brett Cannon | 2007-12-25 | 1 | -7/+12 |
| | | | | | | | | Also fix the test by having the test classes inherit from object. Are the getter/setter/deleter attributes supposed to be able to chain? As of right now they can't as the property tries to call what the property returns, which is another property when they are chained. | ||||
* | Patch #1672 by Joseph Armbruster. Use tempdir() to get a temporary directory. | Guido van Rossum | 2007-12-20 | 1 | -1/+1 |
| | |||||
* | Add tests for the warnings module; specifically formatwarning and showwarning. | Brett Cannon | 2007-12-20 | 1 | -1/+32 |
| | | | | Still need tests for warn_explicit and simplefilter. | ||||
* | Patch #1549 by Thomas Herve. | Guido van Rossum | 2007-12-19 | 1 | -1/+61 |
| | | | | | | This changes the rules for when __hash__ is inherited slightly, by allowing it to be inherited when one or more of __lt__, __le__, __gt__, __ge__ are overridden, as long as __eq__ and __ne__ aren't. | ||||
* | Patch #1583 by Adam Olsen. | Guido van Rossum | 2007-12-19 | 1 | -1/+48 |
| | | | | | | | This adds signal.set_wakeup_fd(fd) which sets a file descriptor to which a zero byte will be written whenever a C exception handler runs. I added a simple C API as well, PySignal_SetWakeupFd(fd). |