[Python-Dev] Decoder functions accept str in py3k (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Wed Jan 7 14:39:12 CET 2009
- Previous message: [Python-Dev] a few strdup() questions...
- Next message: [Python-Dev] Decoder functions accept str in py3k
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
I've just noticed that in py3k, the decoding functions in the codecs module accept str objects as well as bytes:
import codecs
c = codecs.getdecoder('utf8')
c('aa')
('aa', 2)
c('éé')
('éé', 4)
c = codecs.getdecoder('latin1')
c('aa')
('aa', 2)
c('éé')
('éé', 4)
Is it a bug?
Regards
Antoine.
- Previous message: [Python-Dev] a few strdup() questions...
- Next message: [Python-Dev] Decoder functions accept str in py3k
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]