Re: that is it is not it (logic in Python)
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 even on first April. But you also wrote in your original post: Seriously on an April fool's day. which would seem to be falsely denying that your post was an April Fool's prank. Rather bad form, old chap ;-) regards Steve -- Steve Holden+1 703 861 4237 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: that is it is not it (logic in Python)
"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 -- http://mail.python.org/mailman/listinfo/python-list
Re: that is it is not it (logic in Python)
Le Fri, 01 Apr 2005 17:42:30 -0500, Jeremy Bowers a écrit : > 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 the post :-) >> that is it isn't it ? > > Nope, nothing to do with it. Read the ref manual on chained comparision > operators. > > http://www.python.org/doc/2.4/ref/comparisons.html#l2h-430 > > For proof, run the given code in the original post. It's not faked in the > slightest, and the manual holds the key to understanding. *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 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)
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 the post :-) > that is it isn't it ? Nope, nothing to do with it. Read the ref manual on chained comparision operators. http://www.python.org/doc/2.4/ref/comparisons.html#l2h-430 For proof, run the given code in the original post. It's not faked in the slightest, and the manual holds the key to understanding. -- http://mail.python.org/mailman/listinfo/python-list
Re: that is it is not it (logic in Python)
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 not it)' which is clearly > false. > >> False # What ? > > Reread the ref manual on chained comparison operators. And see the date of the post :-) that is it isn't it ? > > Terry J. Reedy > > > -- http://mail.python.org/mailman/listinfo/python-list
Re: that is it is not it (logic in Python)
"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 a looser definition of iterator, then perhaps not. 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 not it)' which is clearly false. > False # What ? Reread the ref manual on chained comparison operators. Terry J. Reedy -- http://mail.python.org/mailman/listinfo/python-list
that is it is not it (logic in Python)
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. -- http://mail.python.org/mailman/listinfo/python-list