You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When instantiating a data class, it usually detects if a required argument is missing and raises an error. In Cython, nothing happens until you try to access the missing field and an AttributeError is thrown:
Traceback (most recent call last):
File "", line 1, in
File "main.py", line 24, in init main
AttributeError: 'Bb' object has no attribute 'a1'
Describe the bug
When instantiating a data class, it usually detects if a required argument is missing and raises an error. In Cython, nothing happens until you try to access the missing field and an AttributeError is thrown:
To Reproduce
Expected behavior
Without Cython, the above yields the following traceback when calling the constructor:
Environment (please complete the following information):
Additional context
Python 3.6.9, Cython 0.29.21, dataclasses 0.7 (backport)
The text was updated successfully, but these errors were encountered: