how to determine an 'open' string?

Skip Montanaro skip at pobox.com
Thu May 16 16:04:36 EDT 2002


    >> How about just trying to eval() the string?  Assuming it begins with
    >> a quotation mark or apostrophe it should be safe to call eval().

    Bernhard> If you mean the builtin eval without any form of restricted
    Bernhard> execution, you're not safe. 

Whoops!  Thanks.  Them dang paren-less tuples!

-- 
Skip Montanaro (skip at pobox.com - http://www.mojam.com/)
"Excellant Written and Communications Skills required" - seen on chi.jobs





More information about the Python-list mailing list