Creating slice notation from string

Jan Kaliszewski zuo at chopin.edu.pl
Wed Sep 2 18:42:51 EDT 2009


Erratum:

>      eval(str(x) + s)
>
> -- but it's worse: less secure (e.g. if s could be user-typed) and most
> probably much more time-consuming (especially the latter).

There should be *repr* instead of *str*.

*j

-- 
Jan Kaliszewski (zuo) <zuo at chopin.edu.pl>



More information about the Python-list mailing list