[issue19094] urljoin should raise a TypeError if URL is not a string

Jason R. Coombs report at bugs.python.org
Tue Oct 1 23:14:06 CEST 2013


Jason R. Coombs added the comment:

Vajrasky, you're right. Comparing against type(obj) is an anti-pattern. isinstance is better. Duck typing is even better (in many cases).

----------

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


More information about the Python-bugs-list mailing list