Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?
davea at davea.name
Wed Dec 4 23:28:02 CET 2013
On Wed, 4 Dec 2013 14:05:11 -0800 (PST), Piotr Dobrogost
<p at google-groups-2013.dobrogost.net> wrote:
> Object's attributes and dictionary's keys are quite different
Right. So if you need arbitrary keys, use a dict. Attributes are
keyed by identifiers, which are constrained. No problem.
More information about the Python-list