[Tutor] Converting from unicode to nonstring

Alan Gauld alan.gauld at btinternet.com
Fri Oct 15 01:00:11 CEST 2010

"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...

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. :-)

Alan Gauld
Author of the Learn to Program web site

More information about the Tutor mailing list