[issue17174] Posix os.path.join should raise TypeError when passed unusable type

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed in issue22034. See also issue21883. -- nosy: +serhiy.storchaka resolution: - out of date stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17174

[issue17174] Posix os.path.join should raise TypeError when passed unusable type

2013-02-09 Thread Thomas Scrace
New submission from Thomas Scrace: Currently os.path.join will raise an AttributeError if passed an argument that does not have an endswith() method. A try/except around the offending line would let us raise a more helpful TypeError: except AttributeError as e: bad =

[issue17174] Posix os.path.join should raise TypeError when passed unusable type

2013-02-09 Thread Janzert
Janzert added the comment: While the current error message is a bit generic, I rather like that it tells you exactly why the type/object passed couldn't be used. -- nosy: +Janzert ___ Python tracker rep...@bugs.python.org

[issue17174] Posix os.path.join should raise TypeError when passed unusable type

2013-02-09 Thread Eric V. Smith
Eric V. Smith added the comment: I think this change should not be made: it's a slippery slope, because there are thousands of places in the stdlib where a similar change could be made. It's the nature of duck typing that you're not going to get a great error message everywhere you pass in