that is it is not it (logic in Python)

2005-04-01 Thread F. Petitjean
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

Re: that is it is not it (logic in Python)

2005-04-01 Thread Terry Reedy
F. Petitjean [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I want to know if iter(iterator) returns always its argument (when argument is an iterator) By the strict definition of iterator (versus iterable) that requires that as a condition to be an iterator, then yes. If you use

Re: that is it is not it (logic in Python)

2005-04-01 Thread F. Petitjean
Le Fri, 1 Apr 2005 13:39:47 -0500, Terry Reedy a écrit : F. Petitjean [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] iterable = range(10) it = iter(iterable) that = iter(it) that is it True# Good! that is it is not it This is equivalent to '(that is it) and (it is

Re: that is it is not it (logic in Python)

2005-04-01 Thread Jeremy Bowers
On Fri, 01 Apr 2005 22:01:25 +, F. Petitjean wrote: Le Fri, 1 Apr 2005 13:39:47 -0500, Terry Reedy a crit : This is equivalent to '(that is it) and (it is not it)' which is clearly false. False # What ? Reread the ref manual on chained comparison operators. And see the date of

Re: that is it is not it (logic in Python)

2005-04-01 Thread F. Petitjean
) are humor-impaired and follow the « ref manual » every time even on first April. There = True Python = map(bool, range(5)) logic = True There is logic in Python True # naturally -- http://mail.python.org/mailman/listinfo/python-list

Re: that is it is not it (logic in Python)

2005-04-01 Thread Terry Reedy
F. Petitjean [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Le Fri, 1 Apr 2005 13:39:47 -0500, Terry Reedy a écrit : Reread the ref manual on chained comparison operators. And see the date of the post :-) Ditto for the reply ;-) TJR --

Re: that is it is not it (logic in Python)

2005-04-01 Thread Steve Holden
F. Petitjean wrote: [...] *I* wrote the original post. and am pretty sure it is not faked. And I run it before posting to be sure not to say anything wrong. it is a kind of relief to learn that computers in 2005 (even Python powered) are humor-impaired and follow the « ref manual » every time