Neal Norwitz
05c09d08f9
Format strings (tuples,) appropriately
2002-04-01 19:01:39 +00:00
Tim Peters
83e7ccc9fd
Whitespace normalization.
2001-09-04 06:37:28 +00:00
Tim Peters
0628a66c75
Restore a line deleted by mistake.
2001-09-03 08:44:02 +00:00
Tim Peters
32f453eaa4
New restriction on pow(x, y, z): If z is not None, x and y must be of
...
integer types, and y must be >= 0. See discussion at
http://sf.net/tracker/index.php?func=detail&aid=457066&group_id=5470&atid=105470
2001-09-03 08:35:41 +00:00
Fred Drake
702ca4ffcb
Revert the previous patch to test_pow.py and move the test to test_unary.py
...
based on a suggestion from Tim Peters; also make sure that we're really
doing exponentiation and not multiplication.
2001-08-30 19:15:20 +00:00
Fred Drake
d256271c55
Added a regression test for the negation-of-exponentiation optimization
...
bug from compile.c. (SF bug #456756.)
2001-08-30 18:56:30 +00:00
Guido van Rossum
28358fbed6
Make the test pass now that 10**-15 returns a float instead of raising
...
an exception.
2001-07-12 12:51:22 +00:00
Fred Drake
132dce2246
Update the code to better reflect recommended style:
...
Use != instead of <> since <> is documented as "obsolescent".
Use "is" and "is not" when comparing with None or type objects.
2000-12-12 23:11:42 +00:00
Fred Drake
004d5e6880
Make reindent.py happy (convert everything to 4-space indents!).
2000-10-23 17:22:08 +00:00
Tim Peters
c54d19043a
SF bug 115831 and Ping's SF patch 101751, 0.0**-2.0 returns inf rather than
...
raise ValueError. Checked in the patch as far as it went, but also changed
all of ints, longs and floats to raise ZeroDivisionError instead when raising
0 to a negative number. This is what 754-inspired stds require, as the "true
result" is an infinity obtained from finite operands, i.e. it's a singularity.
Also changed float pow to not be so timid about using its square-and-multiply
algorithm. Note that what math.pow does is unrelated to what builtin pow
does, and will still vary by platform.
2000-10-06 00:36:09 +00:00
Fred Drake
db1bd5c230
Revise tests to support str(<long int object>) not appending "L".
1999-12-23 15:36:42 +00:00
Guido van Rossum
41360a4696
Mass check-in after untabifying all files that need it.
1998-03-26 19:42:58 +00:00
Guido van Rossum
e2d4dd194b
Use fuzzy comparison from test_support to compare outcome of
...
pow(x,y,z) to pow(x,y)%z.
1997-11-24 22:24:22 +00:00
Guido van Rossum
dc1cdca10b
Test set for new pow() function
1994-08-12 13:14:22 +00:00