This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients ezio.melotti, giampaolo.rodola, l0nwlf, orsenthil, pitrou, r.david.murray
Date 2010-06-21.21:39:19
SpamBayes Score 0.11485597
Marked as misclassified No
Message-id <1277156354.3369.9.camel@localhost.localdomain>
In-reply-to <1277155937.24.0.218989761989.issue9018@psf.upfronthosting.co.za>
Content
> ntpath and macpath raise an AttributeError, so we could:
> 1) change them all to accept only bytes/str and raise a TypeError for
> other wrong types (correct, consistent, non-backward-compatible);

Sounds like the best thing to do.

> The option 2 is still an improvement over the current situation, but
> it would be better to find a backward-compatible way to also obtain
> option 1 (assuming that backward compatibility is a concern here --
> and I think it is (even though people could just change the code to
> catch (AttributeError, TypeError) and eventually get rid of the
> AttributeError)).

This isn't an exception you catch at runtime. It's an exception you get
when your code is wrong, and then you fix your code. Therefore I don't
think backwards compatibility is important.
History
Date User Action Args
2010-06-21 21:39:21pitrousetrecipients: + pitrou, orsenthil, giampaolo.rodola, ezio.melotti, r.david.murray, l0nwlf
2010-06-21 21:39:19pitroulinkissue9018 messages
2010-06-21 21:39:19pitroucreate