[Tutor] What's in a name?

Keith Winston keithwins at gmail.com
Sat Jan 4 06:32:19 CET 2014


On Fri, Jan 3, 2014 at 11:59 PM, Steven D'Aprano <steve at pearwood.info>wrote:

> thelist = vars()[name]



I see: vars() certainly looks less dangerous than eval(), but I'm guessing
that's still smelly code? I hadn't known about vars() or I probably would
have used it.

-- 
Keith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140104/aa3598f5/attachment.html>


More information about the Tutor mailing list