[PATCH v3 02/12] dts: add the aenum dependency
Jeremy Spewock
jspewock at iol.unh.edu
Mon Aug 26 18:42:25 CEST 2024
On Wed, Aug 21, 2024 at 10:53 AM Juraj Linkeš
<juraj.linkes at pantheon.tech> wrote:
>
> Regular Python enumerations create only one instance for members with
> the same value, such as:
> class MyEnum(Enum):
> foo = 1
> bar = 1
>
> MyEnum.foo and MyEnum.bar are aliases that return the same instance.
I didn't know this was a thing in Python Enums. It was very strange to
me at first, but thinking about this more it makes some sense.
>
> DTS needs to return different instances in the above scenario so that we
> can map capabilities with different names to the same function that
> retrieves the capabilities.
>
> Signed-off-by: Juraj Linkeš <juraj.linkes at pantheon.tech>
Reviewed-by: Jeremy Spewock <jspewock at iol.unh.edu>
More information about the dev
mailing list