that is it is not it (logic in Python)

F

F. Petitjean

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

So :
 
T

Terry Reedy

F. Petitjean said:
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.

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
 
F

F. Petitjean

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.


Reread the ref manual on chained comparison operators.
And see the date of the post :)
that is it isn't it ?
 
F

F. Petitjean

Le Fri, 01 Apr 2005 17:42:30 -0500, Jeremy Bowers a écrit :
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.
True # naturally
 
S

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 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,232
Messages
2,571,168
Members
47,803
Latest member
ShaunaSode

Latest Threads

Top