[Tutor] Converting from unicode to nonstring

David Hutto smokefloat at gmail.com
Fri Oct 15 13:54:05 CEST 2010

On Thu, Oct 14, 2010 at 10:09 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> On Fri, 15 Oct 2010 04:43:46 am David Hutto wrote:
>> Fixed with:
>> self.lines = self.newplot.plot(eval(self.plot))
> Anytime you use eval, chances are that it isn't fixed at all, but just
> badly and dangerously papered over.
> I really, really wish that eval and exec weren't built-ins. They're
> powerful but dangerous and slow, and making them built-ins just
> encourages newbies to use them inappropriately.

If inappropriately means that it works as expected:). But seriously, I
haven't found another way, than in thought, about what alan said about
raw_input-running it through their instead, but I haven't tried yet
this morning.
> --
> Steven D'Aprano
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor

More information about the Tutor mailing list