Robert Bradshaw, 18.08.2010 20:16:
> In terms of impacting user code, the only case it impacts is if people
> access __getattr__ by name. Is anyone doing that?

Well, yes, look at the test case I added. It's quite common to map 
__getitem__ or __getattr__ on the other method respectively to provide 
different interfaces for a class, e.g. to provide a __getitem__ fallback 
for names that do not work as a Python identifier. You can also use the 
unbound __getattr__ method to read a sequence of attributes. Maybe not the 
most common but still a valid use case. To me, it's enough to know that 
this breaks code at all, so it's no longer just a simple optimisation but a 
change that breaks a standard Python feature that currently works.

Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to