[issue25209] Append space after completed keywords

Martin Panter report at bugs.python.org
Tue Sep 22 03:41:47 CEST 2015


Martin Panter added the comment:

I agree with adding a space in some cases, but not others. E.g. "pass" would only need a space if you wanted to add a comment, "return" often takes no argument, "lambda" may need an immediate colon (lambda: x). See <https://github.com/vadmium/etc/blob/0f8d459/python/pythonstartup.py#L210> for a whitelist of keywords that I thought should always have spaces, but beware this list may not be up to date (no “await” nor “async” for instance).

BTW I don’t agree with the default of forcing an open bracket “(” for callables; consider decorators, subclassing, deferred function calls, etc, where that bracket may not be wanted.

----------
nosy: +martin.panter

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25209>
_______________________________________


More information about the Python-bugs-list mailing list