[issue27232] os.fspath() should not use repr() on error

Jelle Zijlstra report at bugs.python.org
Sun Jun 5 12:58:05 EDT 2016


New submission from Jelle Zijlstra:

The current implementation of os.fspath() outputs something like this if you call os.fspath(0):

expected str, bytes or os.PathLike object, not <class 'int' at 0x10a3f3e50>

This patch changes the output to:

expected str, bytes or os.PathLike object, not int

----------
components: Library (Lib)
files: fspath-exception.patch
keywords: patch
messages: 267432
nosy: Jelle Zijlstra, ethan.furman
priority: normal
severity: normal
status: open
title: os.fspath() should not use repr() on error
versions: Python 3.6
Added file: http://bugs.python.org/file43239/fspath-exception.patch

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


More information about the Python-bugs-list mailing list