-
Notifications
You must be signed in to change notification settings - Fork 285
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
Confusion between class variable and instance variable when descriptor is used #1722
Open
3 tasks done
Labels
Comments
Note that there's already a test case that could be enabled which would cover this |
danabr
added a commit
to danabr/ironpython3
that referenced
this issue
Aug 15, 2023
This makes the first half of the test in test_descr.set_and_no_get pass. The second part using metaclassses still fail. I am pretty sure this is not the proper approach, but I don't know what that would be. See IronLanguages#1722.
danabr
added a commit
to danabr/ironpython3
that referenced
this issue
Aug 16, 2023
This makes the first half of the test in test_descr.set_and_no_get pass. The second part using metaclasses still fails. See IronLanguages#1722.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Description
Consider the following program:
The output from this program differs between CPython and IronPython.
Steps to Reproduce
Expected behavior: Output should be
[1, 2, 3]
.Actual behavior: Output is
<ListDescriptor object at 0x000000000000002B>
.Workarounds
You can work around this by explictly defining the
__get__
method in ListDescriptor. However, we encountered this in third-party code that we would rather not modify if it could be avoided.The text was updated successfully, but these errors were encountered: