I am used to naming Python arguments in this way:
JavaScript
x
2
1
my_argument='foo'
2
what’s the advantage if I do this instead:
JavaScript
1
2
1
my_argument_='foo"
2
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.
JavaScript
1
5
1
as_
2
with_
3
for_
4
in_
5