Message145864
| Author |
loewis |
| Recipients |
eric.araujo, ezio.melotti, lemburg, loewis, nailor, python-dev, skrah, terry.reedy, vincent.chute, vstinner |
| Date |
2011年10月18日.19:53:13 |
| SpamBayes Score |
9.002604e-11 |
| Marked as misclassified |
No |
| Message-id |
<4E9DD926.5080800@v.loewis.de> |
| In-reply-to |
<1318966945.61.0.169373275917.issue3067@psf.upfronthosting.co.za> |
| Content |
> Thanks for clarification! I see the problem now. So if I get this
> correctly we should change the _build_localename to raise TypeError?
Yes, that's what I'm proposing.
> If the given locale is in wrong format, we'll get TypeError, but if
> it's valid type but otherwise invalid locale (like 'en'), we'll get
> ValueError (or more specifically locale.Error).
Ideally, yes. Notice that it will be difficult to produce a TypeError
for u"en", unless you explicitly test for Unicode objects. |
|