Re: [Python-Dev] Terminology of "Iterable" and "Iterator"

2007-07-25 Thread Greg Ewing
Raymond Hettinger wrote: > In the case of iter(collection), I prefer the current wording because the > target object need not support __iter__, it is sufficient > to supply a sequential __getitem__ method. Seems to me that should be included in the definition of an iterable -- i.e. anything for

Re: [Python-Dev] Terminology of "Iterable" and "Iterator"

2007-07-25 Thread Georg Brandl
Raymond Hettinger schrieb: > The docs do make a distinction and generally follow the definitions given in > the glossary for the tuturial. > > In the case of iter(collection), I prefer the current wording because the > target object need not support __iter__, it is sufficient to supply a > sequent

Re: [Python-Dev] Failure on assorted buildbots - Address already in use

2007-07-25 Thread Facundo Batista
2007/7/25, Nick Coghlan <[EMAIL PROTECTED]>: > Yep, looks like that did the trick. Facundo, a similar change may help > with the GSoC project you're mentoring (the new smtplib tests failed on > at least one of the buildbots). Yes! Alan is already working in this (he sent me today a patch, :). Re

Re: [Python-Dev] -z, -i and -m, maybe bug in runpy?

2007-07-25 Thread Phillip J. Eby
At 08:29 PM 7/25/2007 +1000, Nick Coghlan wrote: >Phillip J. Eby wrote: > > At 12:16 AM 7/25/2007 +1000, Nick Coghlan wrote: > >> I've changed the behaviour in r56520 to simply leave the alterations to > >> sys in place when the function terminates. While this is a definite > >> change to the inter

Re: [Python-Dev] Terminology of "Iterable" and "Iterator"

2007-07-25 Thread Raymond Hettinger
The docs do make a distinction and generally follow the definitions given in the glossary for the tuturial. In the case of iter(collection), I prefer the current wording because the target object need not support __iter__, it is sufficient to supply a sequential __getitem__ method. Raymond

Re: [Python-Dev] Failure on assorted buildbots - Address already in use

2007-07-25 Thread Nick Coghlan
Nick Coghlan wrote: > Andrew Bennetts wrote: >> Or use port 0 to let the operating system pick a free port: >> >> >>> import socket >> >>> s = socket.socket() >> >>> s.bind(("127.0.0.1", 0)) >> >>> s.getsockname() >> ('127.0.0.1', 42669) >> >> -Andrew. > > I've changed test_url

Re: [Python-Dev] Failure on assorted buildbots - Address already in use

2007-07-25 Thread Nick Coghlan
Andrew Bennetts wrote: > Facundo Batista wrote: >> 2007/7/24, Nick Coghlan <[EMAIL PROTECTED]>: >> Maybe the tests should be changed to use a not-so-standard port. > > Or use port 0 to let the operating system pick a free port: > > >>> import socket > >>> s = socket.socket() > >>> s.b

Re: [Python-Dev] Terminology of "Iterable" and "Iterator"

2007-07-25 Thread Nick Coghlan
Calvin Spealman wrote: > This might indicate that it is using "collection" where I would say > "iterable". Also, the same docstring makes mention of something being > an iterator _or_ a sequence, so I also should bring up that it may be > antiquated, yes? http://docs.python.org/dev/lib/typeiter.ht

[Python-Dev] Terminology of "Iterable" and "Iterator"

2007-07-25 Thread Calvin Spealman
I got into a discussion about this, which made me think it would make sense to formalize a distinction between "iterable" and "iterator". To nearly any python developer I talk with, we can define them as: iterable - An object which can be passed to the built-in iter() function, which returns an it

Re: [Python-Dev] -z, -i and -m, maybe bug in runpy?

2007-07-25 Thread Nick Coghlan
Phillip J. Eby wrote: > At 12:16 AM 7/25/2007 +1000, Nick Coghlan wrote: >> I've changed the behaviour in r56520 to simply leave the alterations to >> sys in place when the function terminates. While this is a definite >> change to the interface (and hence not a candidate for direct >> backporting)