From eaa22dbacb5c949058138bd95f42e9eca9cc44dd Mon Sep 17 00:00:00 2001 From: Pankwings Date: Tue, 7 Jun 2022 01:02:50 +0530 Subject: [PATCH] PEP 257: Use sys.maxsize instead of sys.maxint (#2629) In python3, sys.maxint changed to sys.maxsize. --- pep-0257.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pep-0257.txt b/pep-0257.txt index 92ab8221d35..0074cd05b0b 100644 --- a/pep-0257.txt +++ b/pep-0257.txt @@ -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: