On Mon, 22 Apr 2013 09:50:14 -0400, Devin Jeanpierre <jeanpierr...@gmail.com> 
wrote:
> On Mon, Apr 22, 2013 at 7:39 AM, Calvin Spealman <ironfro...@gmail.com> wrote:
> > if two lines is cumbersome, you're in for a cumbersome life a programmer.
> 
> Other encodings are either missing completely from the stdlib, or have
> corrupted behavior. For example, string_escape is gone, and
> unicode_escape doesn't make any sense anymore -- python code is text,
> not bytes, so why does 'abc'.encode('unicode_escape') return bytes? I
> don't think this change was thought through completely before it was
> implemented.

We use unicode_escape (actually raw_unicode_escape) in the email package,
and there we are converting between string and bytes.  It is used as an
encoder when we are supposed to have ASCII input but have other stuff,
and need ASCII output and don't want to lose information.  So yes,
that encoder does still make sense.  It would also be useful as a
transform function, but as someone has pointed out there's an issue
for that.

--David
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to