Why is there no natural syntax for accessing attributes with names not being valid identifiers?

Chris Angelico rosuav at gmail.com
Wed Dec 4 12:40:01 CET 2013

On Wed, Dec 4, 2013 at 10:30 PM, Jussi Piitulainen
<jpiitula at ling.helsinki.fi> wrote:
> Hm. Can't specific classes be made to behave this way even now by
> implementing suitable underscored methods?

Yup. Definitely possible. I don't think it'd be a good idea, though,
not without somehow changing every dict method into a stand-alone


More information about the Python-list mailing list