Roel Schroeven wrote:
Op 6/06/2023 om 16:08 schreef Chris Angelico:
On Wed, 7 Jun 2023 at 00:06, Neal Becker wrote:
>
> The following f-string does not parse and gives syntax error on 3.11.3:
>
> f'thruput/{"user" if opt.return else "cell"} vs. elevation\n'
>
> However this expression, which is
Op 6/06/2023 om 16:48 schreef Chris Angelico via Python-list:
On Wed, 7 Jun 2023 at 00:42, Roel Schroeven wrote:
> (Recently there has been an effort to provide clearer and more useful
> error messages; this seems to be a case where there is still room for
> improvement: "SyntaxError: invalid sy
On Wed, 7 Jun 2023 at 00:42, Roel Schroeven wrote:
> (Recently there has been an effort to provide clearer and more useful
> error messages; this seems to be a case where there is still room for
> improvement: "SyntaxError: invalid syntax" doesn't immediately remind me
> of that fact that 'return'
Op 6/06/2023 om 16:41 schreef Roel Schroeven:
'return' being a keyowrd is definitely going to be the problem.
*keyword
--
"Don't Panic."
-- Douglas Adams, The Hitchhiker's Guide to the Galaxy
--
https://mail.python.org/mailman/listinfo/python-list
Op 6/06/2023 om 16:08 schreef Chris Angelico:
On Wed, 7 Jun 2023 at 00:06, Neal Becker wrote:
>
> The following f-string does not parse and gives syntax error on 3.11.3:
>
> f'thruput/{"user" if opt.return else "cell"} vs. elevation\n'
>
> However this expression, which is similar does parse cor
On Wed, 7 Jun 2023 at 00:06, Neal Becker wrote:
>
> The following f-string does not parse and gives syntax error on 3.11.3:
>
> f'thruput/{"user" if opt.return else "cell"} vs. elevation\n'
>
> However this expression, which is similar does parse correctly:
>
> f'thruput/{"user" if True else "cell
The following f-string does not parse and gives syntax error on 3.11.3:
f'thruput/{"user" if opt.return else "cell"} vs. elevation\n'
However this expression, which is similar does parse correctly:
f'thruput/{"user" if True else "cell"} vs. elevation\n'
I don't see any workaround. Parenthesizi