[issue39081] pathlib '/' operator does not resolve Enums with str mixin as expected

Brett Cannon report at bugs.python.org
Wed Dec 18 12:31:06 EST 2019


Brett Cannon <brett at python.org> added the comment:

Karthikeyan is right and this is working as expected. If you want the semantics you're after you can either implement __fspath__ as was suggested or get the 'value' attribute of the enum when constructing your path.

----------
nosy: +brett.cannon
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39081>
_______________________________________


More information about the Python-bugs-list mailing list