Skip to content

Commit

Permalink
PEP 257: Use sys.maxsize instead of sys.maxint (#2629)
Browse files Browse the repository at this point in the history
In python3, sys.maxint changed to sys.maxsize.
  • Loading branch information
pankwings authored Jun 6, 2022
1 parent bd3afce commit eaa22db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pep-0257.txt
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,14 @@ of the algorithm::
# and split into a list of lines:
lines = docstring.expandtabs().splitlines()
# Determine minimum indentation (first line doesn't count):
indent = sys.maxint
indent = sys.maxsize
for line in lines[1:]:
stripped = line.lstrip()
if stripped:
indent = min(indent, len(line) - len(stripped))
# Remove indentation (first line is special):
trimmed = [lines[0].strip()]
if indent < sys.maxint:
if indent < sys.maxsize:
for line in lines[1:]:
trimmed.append(line[indent:].rstrip())
# Strip off trailing and leading blank lines:
Expand Down

0 comments on commit eaa22db

Please sign in to comment.