Chris Angelico wrote:
> On Sat, Mar 13, 2021 at 1:46 PM Peter Ludemann [email protected] wrote:
> > It's not clear to me what surprising behaviors there would be. Javascript
> > seems to do OK with optional semicolons - presumably its algorithm is
> > similar to what BCPL used. (Or perhaps the surprising behaviors are trivial
> > compared to the other surprises that Javascript springs on people.)
> > Yes, right up until you try to do something like:
> function foo() {
> return
> thing.goes.here()
> }
> which becomes extremely common with frameworks like React.js. There's
> an implicit semicolon and a big block of dead code.
> ChrisA
def foo():
return
thing.goes.here()
is illegal Python; and wouldn't result in a line-join by my proposal.
However:
def foo():
return "A long piece of text (Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua.)" +
thing.goes.here()
would work by my proposal and avoid the extra parentheses that are currently
needed.
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/GUVXVBLWVCCST6NTGSDICZO73QPD7BPV/
Code of Conduct: http://python.org/psf/codeofconduct/