> It states equivalence for two values _based on the name_. I don't know what you mean. "Based on the name" doesn't mean anything in particular to me in this context.
> So you're outright ignoring the comments that this behaviour is to > make CPython more performant? I don't see how I'm ignoring the comment. Yes, breaking the spec improves performance. Is that a reason to not fix the spec, or something? Devin On Sun, Nov 13, 2011 at 9:50 PM, alex23 <wuwe...@gmail.com> wrote: > On Nov 13, 4:28 pm, Devin Jeanpierre <jeanpierr...@gmail.com> wrote: >> > which implies that getattr(x, 'a!b') should be equivalent to x.a!b >> >> No, it does not. The documentation states equivalence for two >> particular values > > It states equivalence for two values _based on the name_. > > "If the string is the name of one of the object’s attributes, the > result is the value of that attribute. For example, getattr(x, > 'foobar') is equivalent to x.foobar." > > The string 'a!b' is the name of the attribute, ergo getattr(x, 'a!b') > _is_ x.a!b. If x.a!b isn't valid CPython, then etc. > >> CPython breaks that equivalence > > So you're outright ignoring the comments that this behaviour is to > make CPython more performant? > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list