I am used to naming Python arguments in this way:
my_argument='foo'
what’s the advantage if I do this instead:
my_argument_='foo"
as is recommended by PEP008?
There must be a good reason for the trailing underscore, so what is it?
Advertisement
Answer
Exactly what it gives in the PEP: it allows you to use something that would otherwise be a Python keyword.
as_ with_ for_ in_