[New-bugs-announce] [issue39081] pathlib '/' operator does not resolve Enums with str mixin as expected
report at bugs.python.org
Tue Dec 17 18:37:20 EST 2019
New submission from Andrew Ni <niandrew7 at gmail.com>:
class MyEnum(str, enum.Enum):
RED = 'red'
# this resolves to: '/Users/niandrew/MyEnum.RED'
# EXPECTED: '/Users/niandrew/red'
str(pathlib.Path.home() / MyEnum.RED)
# this resolves to: '/Users/niandrew/red'
components: Library (Lib)
title: pathlib '/' operator does not resolve Enums with str mixin as expected
versions: Python 3.7
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce