Message145982
> *.encode('rot_13') ==> CodecLookupError
I like the idea of raising a lookup error on .encode/.decode if the codec is not a classic text codec (like ASCII or UTF-8).
> *.transform('ascii') ==> CodecLookupError
Same comment.
> str.transform('bz2') ==> CodecLookupError
A lookup error is surprising here. It may be a TypeError instead. The bz2 can be used with .transform, but not on str. So:
- Lookup error if the codec cannot be used with encode/decode or transform/untransform
- Type error if the value type is invalid
(CodecLookupError doesn't exist, you propose to define a new exception who inherits from LookupError?) |
|
Date |
User |
Action |
Args |
2011-10-19 22:34:49 | vstinner | set | recipients:
+ vstinner, lemburg, gvanrossum, loewis, georg.brandl, cben, ncoghlan, belopolsky, benjamin.peterson, eric.araujo, ssbarnea, flox |
2011-10-19 22:34:48 | vstinner | set | messageid: <1319063688.95.0.0614650932312.issue7475@psf.upfronthosting.co.za> |
2011-10-19 22:34:48 | vstinner | link | issue7475 messages |
2011-10-19 22:34:48 | vstinner | create | |
|