X Tutup
Skip to content

Bug dynamic class throwing on hasattr#96

Merged
jhonabreul merged 2 commits intoQuantConnect:masterfrom
jhonabreul:bug-dynamic-class-throwing-on-hasattr
Dec 2, 2024
Merged

Bug dynamic class throwing on hasattr#96
jhonabreul merged 2 commits intoQuantConnect:masterfrom
jhonabreul:bug-dynamic-class-throwing-on-hasattr

Conversation

@jhonabreul
Copy link
Copy Markdown
Collaborator

Throw AttributeError in tp_getattro for dynamic classes.
Python api documentation indicates it should throw AttributeError, else hasattr would throw instead of returning false when an attribute is not present.

See: https://docs.python.org/3/c-api/object.html#c.PyObject_GenericGetAttr

Python api documentation indicates it should throw AttributeError
@jhonabreul jhonabreul merged commit 360948f into QuantConnect:master Dec 2, 2024
@jhonabreul jhonabreul deleted the bug-dynamic-class-throwing-on-hasattr branch December 2, 2024 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup