[Tutor] Test Question
John Steedman
johnsteedman360 at gmail.com
Mon Jul 1 11:58:37 CEST 2013
Good morning all,
A question that I am unsure about. I THINK I have the basics, but I am not
sure and remain curious.
1. What does this mean?
>>> if my_object in my_sequence:
...
2. What can go wrong with this? What should a code review pick up on?
I believe that "my_sequence" might be a either container class or a
sequence type. An effective __hash__ function would be required for each
"my_object". I HTINK you'd need to avoid using floating point variables
that might round incorrectly.
Are there other issues?
Many thanks indeed.
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130701/19cfe111/attachment.html>
More information about the Tutor
mailing list