30 Jan
2012
30 Jan
'12
5:03 p.m.
Massimo Di Pierro writes:
On Jan 30, 2012, at 1:39 PM, Masklinn wrote:
The issue I have is that, to me, string keys say "arbitrary" and attributes say "enumerated set".
I do not understand the distinciton. In fact getattr(x,...) functionally just delegates to getitem(x.__dict__, ...). I do not see why this delegation should not be achieved using the same operator __getitem__.
That's because you're looking at it through the lens of the implementation. But you're suggesting changing the language. The argument for that cannot depend on the implementation.