Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?
Dave Angel
davea at davea.name
Wed Dec 4 17:28:02 EST 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
things.
Right. So if you need arbitrary keys, use a dict. Attributes are
keyed by identifiers, which are constrained. No problem.
--
DaveA
More information about the Python-list
mailing list