cpython: 84af71e8c051 (original) (raw)

Mercurial > cpython

changeset 96154:84af71e8c051

Issue #23780: Improved error message in os.path.join() with single argument. Idea by R. David Murray. [#23780]

Serhiy Storchaka storchaka@gmail.com
date Tue, 19 May 2015 11:00:07 +0300
parents 933addbc7041
children a3f2b171b765
files Lib/macpath.py Lib/ntpath.py Lib/posixpath.py Lib/test/test_genericpath.py Misc/NEWS
diffstat 5 files changed, 12 insertions(+), 0 deletions(-)[+] [-] Lib/macpath.py 2 Lib/ntpath.py 2 Lib/posixpath.py 2 Lib/test/test_genericpath.py 4 Misc/NEWS 2

line wrap: on

line diff

--- a/Lib/macpath.py +++ b/Lib/macpath.py @@ -53,6 +53,8 @@ def join(s, *p): try: colon = _get_colon(s) path = s

--- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -81,6 +81,8 @@ def join(path, *paths): seps = '\/' colon = ':' try:

--- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -76,6 +76,8 @@ def join(a, *p): sep = _get_sep(a) path = a try:

--- a/Lib/test/test_genericpath.py +++ b/Lib/test/test_genericpath.py @@ -448,6 +448,10 @@ class CommonTest(GenericTest): self.pathmodule.join(42, 'str') with self.assertRaisesRegex(TypeError, errmsg % 'int'): self.pathmodule.join('str', 42)

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -49,6 +49,8 @@ Core and Builtins Library ------- +- Issue #23780: Improved error message in os.path.join() with single argument. +