-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
Cannot use field twice after an is not None
check?
#145
Comments
Also, it's strange that the test must be |
I think this is Static Python reflecting the idea that It might be possible for SP to know that this isn't actually the case for an attribute of a given static type, though, since we can see the definition of the type. The trick here is subclassing, though -- it depends what our rules are on subclasses overriding a normal attribute with a dynamic property. Respecting |
ah, that makes sense, thanks! |
This seems like a related issue: if
|
On Python 3.10.5+cinder, Cinder commit
1aeff3259dc
Example program:
Expected no type error.
But got a type error inside
score2
accessingself.parent.wins
:If you swap that line and the previous one, the error is on
self.parent.losses
instead!The text was updated successfully, but these errors were encountered: