mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
Get rid of remnants of integer division
This commit is contained in:
parent
ed483ba63b
commit
bcc0db82dc
28 changed files with 47 additions and 212 deletions
|
@ -11,8 +11,8 @@ testmeths = [
|
|||
"rsub",
|
||||
"mul",
|
||||
"rmul",
|
||||
"div",
|
||||
"rdiv",
|
||||
"truediv",
|
||||
"rtruediv",
|
||||
"mod",
|
||||
"rmod",
|
||||
"divmod",
|
||||
|
@ -134,16 +134,8 @@ testme - 1
|
|||
testme * 1
|
||||
1 * testme
|
||||
|
||||
if 1/2 == 0:
|
||||
testme / 1
|
||||
1 / testme
|
||||
else:
|
||||
# True division is in effect, so "/" doesn't map to __div__ etc; but
|
||||
# the canned expected-output file requires that __div__ etc get called.
|
||||
testme.__coerce__(1)
|
||||
testme.__div__(1)
|
||||
testme.__coerce__(1)
|
||||
testme.__rdiv__(1)
|
||||
testme / 1
|
||||
1 / testme
|
||||
|
||||
testme % 1
|
||||
1 % testme
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue