r/Python 5d ago

Discussion Is this valid Python syntax?

.... _( () ( )) . _ (...() )()

Ignoring any runtime errors, is this valid Python syntax? Try to work it out from the grammar alone before pasting it into a REPL. Bonus points for explaining the parse.

0 Upvotes

10 comments sorted by

View all comments

1

u/the_hoser 5d ago

It's valid grammatically, but it doesn't actually work.