Files
pybricks-api/pybricks
David Lechner 1b426b90f7 pybricks/parameters: introduce _PybricksEnum class
This adds a _PybricksEnum base class for all enums. In Pybricks
MicroPython, we don't have an Enum class, but rather just simple
lookup tables.

The __repr__() method prints the enum values like the Pybricks
MicroPython implementation and also causes sphinx doc to correctly
print the value when used as a default value for aguments.

The __dir__() method is overloaded for both the instance and the class
to match what is seen in Pybricks MicroPython. This should help hide
things from code Python completion that are not present in MicroPython.
2020-01-11 21:08:24 -06:00
..
2019-05-09 17:15:52 +02:00
2020-01-11 21:08:20 -06:00
2019-05-09 17:15:52 +02:00
2020-01-01 13:18:41 +01:00
2020-01-11 21:08:20 -06:00
2019-10-18 18:11:57 +02:00
2020-01-09 22:21:42 +01:00
2019-11-11 15:13:13 +01:00
2020-01-11 21:08:20 -06:00
2019-06-04 15:45:36 +02:00