July 22, 2010
9:51 p.m.
On 7/22/2010 2:04 PM, John Nagle wrote:
From: Bartosz Tarnowski<bartosz-tarnowski@zlotniki.pl>
Python has more and more reserved words over time ... What should I do then, when the attribute is a reserver word?
I am going to be a grinch and note that this is strictly a usage question with no development implications. It therefore is off topic here and should have been asked and answered on python-list or the mirrored newsgroup.
That's a misuse of attributes. When you need objects with unconstrained fields, inherit them from "dict", and write
print(elem['param'])
Right ;-) -- Terry Jan Reedy