Re: [Tutor] Off Topic: xrange, WAS: Re: the and command

2007-08-24 Thread Eric Brunson
Kent Johnson wrote: > Dave Kuhlman wrote: > >> I thought xrange() returned an iterator. I was wrong. >> >> Actually xrange() returns an xrange object which, according to the >> docs, is "an opaque sequence". >> > > Interesting. So an xrange object is an iterable sequence, not an iterator.

Re: [Tutor] Off Topic: xrange, WAS: Re: the and command

2007-08-24 Thread Kent Johnson
Dave Kuhlman wrote: > I thought xrange() returned an iterator. I was wrong. > > Actually xrange() returns an xrange object which, according to the > docs, is "an opaque sequence". Interesting. So an xrange object is an iterable sequence, not an iterator. Kent ___

Re: [Tutor] Off Topic: xrange, WAS: Re: the and command

2007-08-24 Thread Dave Kuhlman
On Fri, Aug 24, 2007 at 09:52:16AM -0400, Kent Johnson wrote: Kent and Alan - Thanks for encouraging me to do a little reading and experimenting. I thought xrange() returned an iterator. I was wrong. Actually xrange() returns an xrange object which, according to the docs, is "an opaque sequenc

Re: [Tutor] Off Topic: xrange, WAS: Re: the and command

2007-08-24 Thread Kent Johnson
Alan Gauld wrote: > "Kent Johnson" <[EMAIL PROTECTED]> wrote > >> possible = set(xrange(4, 1000, 4)).intersection(xrange(5, 1000, 5)) >> \ >> .intersection(xrange(6, 1000, 6)) >> > > Kent, > > I've noticed in a few of your replie recemntly you have been using > xrange rather than ra

[Tutor] Off Topic: xrange, WAS: Re: the and command

2007-08-24 Thread Alan Gauld
"Kent Johnson" <[EMAIL PROTECTED]> wrote > possible = set(xrange(4, 1000, 4)).intersection(xrange(5, 1000, 5)) > \ > .intersection(xrange(6, 1000, 6)) > Kent, I've noticed in a few of your replie recemntly you have been using xrange rather than range. I was under the impression that