Skip to content

Conversation

@sobolevn
Copy link
Member

@sobolevn sobolevn commented Jan 11, 2023

I went with the easiest solution: just raise a TypeError in this case.
What are other options? 🤔

@sobolevn
Copy link
Member Author

365556c is an alternative approach to 9bc9512

365556c does not raise, instead it uses this logic:

if (PyObject_TypeCheck(new, &PyProperty_Type)) {
        Py_XSETREF(((propertyobject *) new)->prop_name,
                   Py_XNewRef(pold->prop_name));
    }

@sobolevn sobolevn closed this Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants