Karthikeyan Singaravelan <[email protected]> added the comment:
Slightly off topic but while trying to look at the code I can see a space
between function name and parenthesis as below. It's not an invalid syntax but
it's mentioned as a pet peeve in PEP 8 to not to have space between function
name and parenthesis. I did a simple grep and I could some places where even
function definitions have spaces as below. It's a trivial thing but just wanted
to post it here and might seem like an invalid syntax for someone new fixing it.
# Lib/xmlrpc/server.py
argspec = inspect.formatargspec (
# simple grep and manual scanning with `rg '\w+ \(' | grep -v -E
'if|while|for|except|return' | grep '.py' | less`
Tools/gdb/libpython.py: def __init__ (self, gdbval):
Tools/gdb/libpython.py: def to_string (self):
Tools/gdb/libpython.py:def register (obj):
Tools/gdb/libpython.py:register (gdb.current_objfile ())
Tools/gdb/libpython.py: gdb.Command.__init__ (self,
Tools/gdb/libpython.py: gdb.Command.__init__ (self,
Tools/gdb/libpython.py: gdb.Command.__init__ (self,
Tools/gdb/libpython.py: gdb.Command.__init__ (self,
Tools/gdb/libpython.py: gdb.Command.__init__ (self,
# Relevant PEP 8 section : https://www.python.org/dev/peps/pep-0008/#pet-peeves
> Immediately before the open parenthesis that starts the argument list of a
> function call:
> Yes: spam(1)
> No: spam (1)
Also I think it will be good if a deprecation is made then it has to run the
test suite with `-Werror` so that the deprecations are fixed which is slightly
subjective though where deprecations are reverted back in a future version for
reasons like easy 2to3 porting.
Thanks much for these easy issues and I hope someone takes it up.
----------
nosy: +xtreak
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue33911>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com