Menu

#517 code autoformat for lambda *args: expression

open
nobody
None
5
2011-02-15
2011-02-15
Will Berry
No

If I have the code auto-formatter set to add spaces after binary operators (i.e. x = 2 * 3), it treats the * character as a multiplication operator in this situation when it should not: cons = lambda *args: args

For keyword arguments the auto-formatter correctly (in my view) leaves the double-star alone:
dictf = lambda **kwargs: kwargs

Request enhancement to the auto-formatter to specifically check for the lambda keyword used with varargs, and do not treat the * as a multiplication operator. Or perhaps, have that be a configurable option separately from multiplication.

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.