that is it is not it (logic in Python)

F. Petitjean littlejohn.75 at news.free.fr
Fri Apr 1 03:52:49 EST 2005


I want to know if iter(iterator) returns always its argument (when
argument is an iterator)

So :
>>> iterable = range(10)
>>> it = iter(iterable)
>>> that = iter(it)
>>> that is it
True    # Good!
>>> that is it is not it
False   # What ?
>>>
>>> Python = map(bool, it)
>>> logic = True
>>> logic in Python is not it
True  # That was close!
>>>
>>> that is it or it is not it
True
>>>
>>> # from physics.constant import N
>>> N = 6.02e+27
>>> big = 192   # cm   1.92 meter is big for me (see my name)
>>> N is big
False   # what ?
>>>

--
Seriously on an April fool's day.



More information about the Python-list mailing list