ironpython2 icon indicating copy to clipboard operation
ironpython2 copied to clipboard

Custom metaclass causes AttributeErrors to lose binding info.

Open mickp opened this issue 2 years ago • 0 comments

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)]

mickp avatar Jan 04 '24 07:01 mickp