Jan-12-2021, 07:39 PM
Python.org (in the PEP 8 Style Guide for Python Code) says that this is incorrect syntax:
Would "limit=1000" be correct? I wouldn't think so because this section seems unannotated. If it is annotated, it is combining a default value with the annotation (namely "input"). In either of these cases, I would think a space around the equals sign "=" would be necessary.
def munge(input: AnyStr, limit = 1000): ...But to me this uses spaces around a default value assignment correctly. This is consistent with PEP 8's "Other Recommendations": https://www.python.org/dev/peps/pep-0008...mendations
Would "limit=1000" be correct? I wouldn't think so because this section seems unannotated. If it is annotated, it is combining a default value with the annotation (namely "input"). In either of these cases, I would think a space around the equals sign "=" would be necessary.