On Mon, Jun 9, 2014 at 3:08 AM, Ian Kelly <ian.g.ke...@gmail.com> wrote:
> On Sun, Jun 8, 2014 at 10:48 AM, Chris Angelico <ros...@gmail.com> wrote:
>> Except that it's even more complicated than that, because hasattr
>> wasn't defined in your module, so it has a different set of globals.
>> In fact, this would mean that hasattr would become quite useless.
> hasattr is a builtin, so it has no globals at all. It would have to
> use the calling scope for UFCS resolution as in my example
Same difference. It can't simply look for the name in globals(), it
has to figure out based on the caller's globals.