[New-bugs-announce] [issue30427] isinstance checks in os.path.normcase redundant with os.fspath

Wolfgang Maier report at bugs.python.org
Mon May 22 04:17:57 EDT 2017


New submission from Wolfgang Maier:

os.path.normcase as defined in both posixpath and ntpath is now calling os.fspath on its argument first. With that I think the following isinstance(str, bytes) checks have become redundant since AFAIU os.fspath is guaranteed to return either str or bytes instances.

----------
components: Library (Lib)
messages: 294130
nosy: wolma
priority: normal
severity: normal
status: open
title: isinstance checks in os.path.normcase redundant with os.fspath
versions: Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30427>
_______________________________________


More information about the New-bugs-announce mailing list