Vajrasky Kok added the comment: Okay, attached the patch based on your comment, Senthil Kumaran. Thanks.
The reason I use isinstance to check the type is because I want to support the inheritance as much as possible. >>> class new_str(str): ... pass >>> urljoin(new_str('http://python.org') + new_str('hehe')) will not work with the newest patch. Also, in Lib/urllib/parse.py, most of the time, we use isinstance(x, str) not type(x) == str. But I don't know. Maybe it does not matter. ---------- Added file: http://bugs.python.org/file31933/urljoin_throws_type_error_v3.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19094> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com