mirror of
https://github.com/python/cpython.git
synced 2025-10-08 08:01:55 +00:00
The first batch of changes recommended by the fixdiv tool. These are
mostly changes of / operators into //. Once or twice I did more or less than recommended.
This commit is contained in:
parent
b8f2274985
commit
54e54c6877
19 changed files with 38 additions and 38 deletions
|
@ -54,10 +54,10 @@ for i in range(256):
|
|||
fillers = fillers + c
|
||||
def addnoise(line):
|
||||
noise = fillers
|
||||
ratio = len(line) / len(noise)
|
||||
ratio = len(line) // len(noise)
|
||||
res = ""
|
||||
while line and noise:
|
||||
if len(line) / len(noise) > ratio:
|
||||
if len(line) // len(noise) > ratio:
|
||||
c, line = line[0], line[1:]
|
||||
else:
|
||||
c, noise = noise[0], noise[1:]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue