Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom metaclass causes AttributeErrors to lose binding info. #837

Open
mickp opened this issue Jan 4, 2024 · 0 comments
Open

Custom metaclass causes AttributeErrors to lose binding info. #837

mickp opened this issue Jan 4, 2024 · 0 comments

Comments

@mickp
Copy link
Contributor

mickp commented Jan 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants