[Python-Dev] Call for prudence about PEP-572
Steve Holden
steve at holdenweb.com
Sun Jul 8 12:45:24 EDT 2018
More information about the Python-Dev mailing list
Sun Jul 8 12:45:24 EDT 2018
- Previous message (by thread): [Python-Dev] Call for prudence about PEP-572
- Next message (by thread): [Python-Dev] Call for prudence about PEP-572
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Jul 8, 2018 at 10:41 AM, Giampaolo Rodola' <g.rodola at gmail.com> wrote: > [...] > I find that (space between the parentheses of a function call statement) > too unnatural as a place where to put an assignment. It is not even > "guarded" by a keyword like "if" or "while" which can help as indicators > that an assignment may occur. Also, I think it's way too easy to confuse it > with a keyword argument: > > >>> foo(x = 1) # keyword arg > >>> foo(x := 1) # assignment + value passing > [...] > But the PEP 8 spellings are foo(x=1) and f(x := 1). The extra spacing makes it obvious that this isn't a regular named argument. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20180708/b3f492e2/attachment.html>
- Previous message (by thread): [Python-Dev] Call for prudence about PEP-572
- Next message (by thread): [Python-Dev] Call for prudence about PEP-572
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list