On 9 February 2013 20:08, R. David Murray <rdmur...@bitdance.com> wrote: > > > Especially given that there is already a try/except there, this seems > fine to me. I think perhaps the error text would be better if it > referred only to the type that is invalid, not to str. So something > like: > > TypeError("object of type {} is not valid as a path > "component".format(type(bad))) > > --David
I agree that this is a better error message. I have raised an enhancement issue as Terry suggested: http://bugs.python.org/issue17174 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com