Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Update uses of string exceptions | Andrew M. Kuchling | 2008-09-13 | 1 | -1/+1 |
| | |||||
* | Subclass exception | Andrew M. Kuchling | 2008-09-13 | 1 | -1/+2 |
| | |||||
* | #687648 from Robert Schuppenies: use classic division. From me: don't use ↵ | Andrew M. Kuchling | 2008-09-13 | 1 | -5/+10 |
| | | | | string exception; add __main__ section | ||||
* | #2503 make singletons compared with "is" not == or != | Benjamin Peterson | 2008-03-29 | 1 | -1/+1 |
| | | | | Thanks to Wummel for the patch | ||||
* | Remove reference to Rational | Mark Dickinson | 2008-02-10 | 1 | -1/+0 |
| | |||||
* | Add rational.Rational as an implementation of numbers.Rational with infinite | Jeffrey Yasskin | 2008-01-15 | 1 | -310/+0 |
| | | | | | | | | | | | | | 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. | ||||
* | Normalized a few cases of whitespace in function declarations. | Martin Blais | 2006-06-06 | 1 | -35/+35 |
| | | | | | | | | | | | | Found them using:: find . -name '*.py' | while read i ; do grep 'def[^(]*( ' $i /dev/null ; done find . -name '*.py' | while read i ; do grep ' ):' $i /dev/null ; done (I was doing this all over my own code anyway, because I'd been using spaces in all defs, so I thought I'd make a run on the Python code as well. If you need to do such fixes in your own code, you can use xx-rename or parenregu.el within emacs.) | ||||
* | * Fix error in definition of Im() which returned self instead of 0 | Raymond Hettinger | 2005-04-09 | 1 | -19/+14 |
| | | | | | | | | | | | | | | | | for non-complex arguments. * Replace type() comparisons with isinstance() checks. * Replace apply() calls with equivalent syntactic form. * Simplify __hash__ definition to hash the underlying tuple. * Use math.hypot() for more robust computation of __abs__(). * Use sorted() instead of the multi-step keys/sort/iter. * Update comment on the cmath module. | ||||
* | Patch #1177597: Correct various bugs, add comments. | Martin v. Löwis | 2005-04-09 | 1 | -9/+36 |
| | |||||
* | Add code for a range function that uses generators. | Brett Cannon | 2004-06-27 | 1 | -42/+64 |
| | | | | | | | | | Cleaned up existing code by abstracting code to parse arguments. Also removed any unneeded operations (such as calling 'int' on a division when using floor division also works). Fixed a bug where the values returned by OldStyleRange could be short by one value. Added more documentation. Testing code also has a basic sanity check. | ||||
* | Replace backticks with repr() or "%r" | Walter Dörwald | 2004-02-12 | 5 | -35/+36 |
| | | | | From SF patch #852334. | ||||
* | SF patch #803449: modernize demo scripts | Raymond Hettinger | 2003-09-10 | 2 | -93/+89 |
| | | | | (Contributed by George Yoshida.) | ||||
* | Patch #748846: Let Demo/classes/Date.py mention DateTime module. | Martin v. Löwis | 2003-06-07 | 1 | -0/+3 |
| | |||||
* | Run these demo scripts through reindent.py to give them 4-space indents. ↵ | Andrew M. Kuchling | 2003-04-24 | 7 | -963/+963 |
| | | | | I've verified that their output is unchanged. | ||||
* | Modernize code by using isinstance() instead of type() checks | Andrew M. Kuchling | 2003-04-24 | 1 | -16/+14 |
| | |||||
* | Avoid TypeError by not comparing complex numbers | Andrew M. Kuchling | 2003-04-24 | 1 | -1/+6 |
| | |||||
* | Update docs. Remove old classes.doc. | Guido van Rossum | 2002-10-18 | 2 | -112/+1 |
| | |||||
* | Correct spelling of length, discovered by Christian Tismer. | Guido van Rossum | 1999-04-21 | 1 | -2/+2 |
| | |||||
* | nannified. | Guido van Rossum | 1998-09-14 | 1 | -70/+70 |
| | |||||
* | Fix a bug where comparison of a rational with a float failed because | Guido van Rossum | 1998-09-09 | 1 | -9/+9 |
| | | | | | | | the difference got converted to float. Put brackets around the string representation of (non-integer) rationals. (Sjoerd Mullender.) | ||||
* | Fix the test for pow() -- no more TypeErrors are raised! | Guido van Rossum | 1997-12-09 | 1 | -2/+2 |
| | |||||
* | A completely new Rat.py by Sjoerd. | Guido van Rossum | 1997-05-13 | 1 | -56/+260 |
| | |||||
* | Added note about Python's support of complex numbers. | Guido van Rossum | 1996-07-30 | 1 | -1/+11 |
| | | | | Added exp(z). | ||||
* | adapted to new overloading scheme | Guido van Rossum | 1994-10-09 | 2 | -60/+51 |
| | |||||
* | totally redone for new overloading scheme | Guido van Rossum | 1994-10-08 | 1 | -60/+263 |
| | |||||
* | Use time.time() instead of time.millitimer() | Guido van Rossum | 1994-02-17 | 1 | -5/+5 |
| | |||||
* | builtin -> __builtin__ | Guido van Rossum | 1994-01-26 | 1 | -2/+2 |
| | |||||
* | *** empty log message *** | Guido van Rossum | 1993-12-17 | 8 | -49/+51 |
| | |||||
* | Added Dates.py and Rev.py | Guido van Rossum | 1993-10-30 | 1 | -0/+2 |
| | |||||
* | Initial revision | Guido van Rossum | 1993-10-30 | 2 | -0/+322 |
| | |||||
* | Fix bug and use __init__ | Guido van Rossum | 1993-10-30 | 1 | -9/+4 |
| | |||||
* | *** empty log message *** | Guido van Rossum | 1993-10-27 | 1 | -0/+1 |
| | |||||
* | Add coercions | Guido van Rossum | 1993-10-27 | 1 | -2/+12 |
| | |||||
* | Initial revision | Guido van Rossum | 1993-10-27 | 1 | -0/+341 |
| | |||||
* | Initial revision | Guido van Rossum | 1992-08-13 | 7 | -0/+488 |