[issue39081] pathlib '/' operator does not resolve Enums with str mixin as expected
Ethan Furman
report at bugs.python.org
Wed Dec 18 12:48:52 EST 2019
Ethan Furman <ethan at stoneleaf.us> added the comment:
The other option is to continue to inherit from `str`, but override the `__str__` method:
class MyEnum(str, enum.Enum):
#
def __str__(self):
return self.value
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39081>
_______________________________________
More information about the Python-bugs-list
mailing list