A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2009-January/084885.html below:

[Python-Dev] Decoder functions accept str in py3k

[Python-Dev] Decoder functions accept str in py3kGuido van Rossum guido at python.org
Wed Jan 7 16:34:57 CET 2009
Sounds like yet another remnant of the old philosophy, which indeed
supported encode and decode operations on both string types. :-(

On Wed, Jan 7, 2009 at 5:39 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> 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('éé')
>  ('Ã(c)Ã(c)', 4)
>
> Is it a bug?
>
> Regards
>
> Antoine.
>
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
>



-- 

--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4