[Tutor] Converting from unicode to nonstring

David Hutto smokefloat at gmail.com
Fri Oct 15 13:53:50 CEST 2010


On Thu, Oct 14, 2010 at 7:00 PM, Alan Gauld <alan.gauld at btinternet.com> wrote:
>
> "David Hutto" <smokefloat at gmail.com> wrote
>
>> it's not necessary to worry about insertion of data other than my own
>> inputs.
>
> But can you be sure that you won't accidentally mistype something
> that eval can read as valid code but that does something unexpected
> - even if its only throw an apparently bizarre error dump at you...

probably not, because I haven't had much experience with using eval.

>
> Relying on eval() reading your database content as if it were Python
> code - which is what it does - is a risky strategy.
>
> But, heh, it's your data, your project, so as long as you understand
> the risks then it's your decision. :-)

It's not that I want faulty data, it was the only thing thus far I'd
tried that worked under the generalized circumstances I'm testing it
under.

>
> --
> Alan Gauld
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
>
>
>
>
> _______________________________________________
> 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