[Python-bugs-list] [ python-Feature Requests-617979 ] need easy way of decoding a literal

noreply@sourceforge.net noreply@sourceforge.net
Thu, 03 Oct 2002 09:45:45 -0700


Feature Requests item #617979, was opened at 2002-10-03 09:00
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=617979&group_id=5470

Category: Unicode
Group: None
Status: Open
Resolution: None
Priority: 6
Submitted By: Michael Hudson (mwh)
Assigned to: Nobody/Anonymous (nobody)
Summary: need easy way of decoding a literal

Initial Comment:
Especially since PEP 263, we badly need a way of
turning a Python string literal into the appropriate
object.

The immediate need is to get the compiler package
working again, but I'm sure there are other places it
could be used.

I thought Martin already had a patch somewhere doing
this, but I can't find it.  Maybe he remembers?

----------------------------------------------------------------------

>Comment By: Michael Hudson (mwh)
Date: 2002-10-03 16:45

Message:
Logged In: YES 
user_id=6656

How do you get eval to take notice of the declared encoding?

What I want is the functionality of compile.c:parsestr
available from Python.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2002-10-03 16:35

Message:
Logged In: YES 
user_id=21627

Not sure what you are asking. eval() would certainly be an
easy way, no?
In any case, I'm not aware of an alternative.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=617979&group_id=5470