[Tutor] eval func with floating...

Peter Otten __peter__ at web.de
Tue Aug 23 17:44:30 CEST 2011

Chanakya Mitra wrote:

> c=set(a).intersection(set(check))

[Chanakya Mitra]
> shouldn’t this be:
> c=set(a).issubset(set(check))
> ?

> set(a).intersection(set(check)) will be true as long as only one element
> appears in both. ie. 15/a8 kill the process and spit out an error instead
> of asking "error! please use -defined operators-!"

You are right. 

The original poster may still run into errors because input strings that 
aren't a valid Python expression are possible even with the restricted 
character set.

More information about the Tutor mailing list