IronLanguages / ironpython2

Implementation of the Python programming language for .NET Framework; built on top of the Dynamic Language Runtime (DLR).

Home Page:http://ironpython.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom metaclass causes AttributeErrors to lose binding info.

mickp opened this issue · comments

commented

Given

class Meta(type):
    pass

class Thing(object):
    __metaclass__ = Meta
>>> Thing.xyz

Expected behavior:
Verified in cpython 2.7.17

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: type object 'Thing' has no attribute 'xyz'

Actual behavior:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'Meta' object has no attribute 'xyz'

Versions

IronPython 2.7.12 (2.7.12.1000)
[.NETFramework,Version=v4.5 on .NET Framework 4.8.9195.0 (64-bit)]