Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
Open
Description
Bug report
Bug description:
WithPEP 696 +PEP 749, the following works just fine:
classScalar[CompatT,TruthT=BoolScalar]: ...classBoolScalar(Scalar): ...classIntScalar(Scalar[int]): ...# OK ✅️
However, if we switch around the order of definition, the code breaks:
classScalar[CompatT,TruthT=BoolScalar]: ...classIntScalar(Scalar[int]): ...# ❌️ NameError: name 'BoolScalar' is not definedclassBoolScalar(Scalar): ...
I guess since the default gets evaluated here. Not sure whether this is a bug or feature request, but it would be nice if the evaluation of the default could be deferred in is case as well.
CPython versions tested on:
3.14
Operating systems tested on:
Linux