Open noahseger opened 4 months ago
What language does this apply to? Python
Describe the problem you are trying to solve.
Fields named, for example from, are inaccessible because they shadow the Python keyword.
from
https://stackoverflow.com/a/30145419
Describe the solution you'd like Additionally (backwards compatible) generate a field named like from_ in the Python protoc and PYI protoc.
from_
This convention is documented in PEP8:
single_trailingunderscore: used by convention to avoid conflicts with Python keyword, e.g.
https://peps.python.org/pep-0008/#descriptive-naming-styles
Describe alternatives you've considered getattr/setattr hacks.
getattr
setattr
Additional context N/A
FYI @anandolee
What language does this apply to? Python
Describe the problem you are trying to solve.
Fields named, for example
from
, are inaccessible because they shadow the Python keyword.https://stackoverflow.com/a/30145419
Describe the solution you'd like Additionally (backwards compatible) generate a field named like
from_
in the Python protoc and PYI protoc.This convention is documented in PEP8:
https://peps.python.org/pep-0008/#descriptive-naming-styles
Describe alternatives you've considered
getattr
/setattr
hacks.Additional context N/A