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
Consider the following example of a class with a class variable that is an instance of itself. It's impossible to reference class names within the immediately body of the class, as the class is not defined yet:
If I understand correctly, I think this is a neat idea but somewhat out of scope for attrs and a little bit of a niche use case. You could probably do this youself by wrapping @define with your own function and running a little bit of post processing?
Uh oh!
There was an error while loading. Please reload this page.
Consider the following example of a class with a class variable that is an instance of itself. It's impossible to reference class names within the immediately body of the class, as the class is not defined yet:
Instead, you have to do something like ths:
(This is an extremely simplified example to demonstrate this aspect.) It would be nice to support this natively, with something like:
Or maybe just interpret the usual attrs functions appropriately for
ClassVar
, like:The text was updated successfully, but these errors were encountered: