Re: [Python-3000] xrange vs. int.__getslice__

2006-07-04 Thread Vladimir 'Yu' Stepanov
Ivan Krstic wrote: > Vladimir 'Yu' Stepanov wrote: > >> - >> for i in xrange(100): pass >> vs. >> for i in int[:100]: pass >> - >> > > I'm a strong -1 on this; it makes it look like float

Re: [Python-3000] xrange vs. int.__getslice__

2006-07-04 Thread Diogo Kollross
> It is how much possible to understand slice in Python language is a > reception of a range of values with the certain step. By default this > step is equal to 1 for objects of any type. It is possible to assume, > that the similar behaviour can be at types float, decimal, long and > other. As the

[Python-3000] The main module in Py3k

2006-07-04 Thread Nick Coghlan
PEP 299 recently got added to the list of ideas to be reconsidered for Py3k. The motivation seemed to be that the current idiom is both ugly and unintuitive if you haven't drunk enough of the relevant Koolaid. I can't really argue with that assessment, but I think PEP 299 proposes more radical

Re: [Python-3000] [Python-Dev] xrange vs. int.__getslice__

2006-07-04 Thread Guido van Rossum
Please don't cross-post python-dev and python-3000. This proposal will not be adopted in Py3k. Instead, range() will become more like xrange(). --Guido On 6/13/06, Vladimir 'Yu' Stepanov <[EMAIL PROTECTED]> wrote: > You were bothered yet with function xrange ? :) I suggest to replace it. > > ---

Re: [Python-3000] The main module in Py3k

2006-07-04 Thread Guido van Rossum
On 7/4/06, Nick Coghlan <[EMAIL PROTECTED]> wrote: > PEP 299 recently got added to the list of ideas to be reconsidered for Py3k. > The motivation seemed to be that the current idiom is both ugly and > unintuitive if you haven't drunk enough of the relevant Koolaid. > > I can't really argue with th

Re: [Python-3000] The main module in Py3k

2006-07-04 Thread Giovanni Bajo
Guido van Rossum wrote: >> Relative imports from modules executed with -m, however, would now >> be able to use the normal relative import mechanism and the >> __module_name__ workaround proposed for the 2.x series could >> disappear. > > Frankly, I am beginning to regret ever having endorsed the

Re: [Python-3000] range vs. int.__getslice__

2006-07-04 Thread Vladimir 'Yu' Stepanov
Diogo Kollross wrote: >> It is how much possible to understand slice in Python language is a >> reception of a range of values with the certain step. By default this >> step is equal to 1 for objects of any type. It is possible to assume, >> that the similar behaviour can be at types float, decimal

Re: [Python-3000] [Python-Dev] xrange vs. int.__getslice__

2006-07-04 Thread Georg Brandl
Guido van Rossum wrote: > Please don't cross-post python-dev and python-3000. > > This proposal will not be adopted in Py3k. Instead, range() will > become more like xrange(). Added to PEP 3099. Georg ___ Python-3000 mailing list [email protected]

Re: [Python-3000] The main module in Py3k

2006-07-04 Thread Guido van Rossum
\On 7/4/06, Giovanni Bajo <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > >> Relative imports from modules executed with -m, however, would now > >> be able to use the normal relative import mechanism and the > >> __module_name__ workaround proposed for the 2.x series could > >> disappear.

Re: [Python-3000] The main module in Py3k

2006-07-04 Thread Greg Ewing
Nick Coghlan wrote: > The existing "if __name__ == '__main__' idiom would be replaced by a simple > "if __main__:" That sounds good. > A new attribute in the sys module "main" would always reference the main > module of the application. The main module would also be stored in > sys.modules >