Asserting concrete values in subclasses (is_class_field?) #2085
Unanswered
Natureshadow
asked this question in
Q&A
Replies: 2 comments
-
Hi @Natureshadow - thanks for the discussion topic! I believe the Can I clarify your question? Will the "concrete set of values for |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi,
Can I clarify your question? Will the "concrete set of values for `credentials` in FooFactor" be `id`s?
Yes.
Cheers,
Nik
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Given the following model fragment:
I will later subclass
Factor
, to make, e.g., aFooFactor
.FooFactor
shall define a concrete set of values for thecredentials
slot, which all instances ofFooFactor
will get.How could I model this?
I found the
is_class_field
attribute, which reads as if it should do what I want, but I am still missing the part of the puzzle where I provide the concrete values to assert fromFooFactor
on its instances.If it helps, I could make the
credentials
slot point to an enum instead.Beta Was this translation helpful? Give feedback.
All reactions