Re: [Python-Dev] cpython (2.7): note Ellipsis syntax

2011-08-05 Thread Chris Withers
On 31/07/2011 07:47, Raymond Hettinger wrote: It's really nice for stub functions: def foo(x): ... I guess pass is too pass-é? ;-) Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk _

Re: [Python-Dev] cpython (2.7): note Ellipsis syntax

2011-07-31 Thread Antoine Pitrou
On Sat, 30 Jul 2011 23:47:36 -0700 Raymond Hettinger wrote: > > > > (Also, there must have been some reason to make "..." available everywhere > > for Python 3.) > > > > It's really nice for stub functions: > > def foo(x): > ... Using a docstring looks a lot less hackish (and it encourage

Re: [Python-Dev] cpython (2.7): note Ellipsis syntax

2011-07-31 Thread Nick Coghlan
On Sun, Jul 31, 2011 at 4:28 PM, Georg Brandl wrote: > (Also, there must have been some reason to make "..." available everywhere > for Python 3.) Not really - it just let us ditch some special casing in the compilation toolchain that *restricted* it to being used in subscripts (i.e. we were look

Re: [Python-Dev] cpython (2.7): note Ellipsis syntax

2011-07-30 Thread Raymond Hettinger
On Jul 30, 2011, at 11:28 PM, Georg Brandl wrote: > > (Also, there must have been some reason to make "..." available everywhere > for Python 3.) > It's really nice for stub functions: def foo(x): ... Raymond ___ Python-Dev mailing list Pytho

Re: [Python-Dev] cpython (2.7): note Ellipsis syntax

2011-07-30 Thread Georg Brandl
On 07/30/11 19:25, Benjamin Peterson wrote: > 2011/7/30 Georg Brandl : >> On 07/30/11 17:00, benjamin.peterson wrote: >>> http://hg.python.org/cpython/rev/402f94edf11b >>> changeset: 71637:402f94edf11b >>> branch: 2.7 >>> user:Benjamin Peterson >>> date:Sat Jul 30 09:59:12 2

Re: [Python-Dev] cpython (2.7): note Ellipsis syntax

2011-07-30 Thread Greg Ewing
Benjamin Peterson wrote: why would you use Ellipsis outside of slices? I could imagine someone wanting to use it as part of a function API. For example, print(a, b, c, ...) would have been a nice way to tell print() not to put a newline on the end. -- Greg ___

Re: [Python-Dev] cpython (2.7): note Ellipsis syntax

2011-07-30 Thread Benjamin Peterson
2011/7/30 Georg Brandl : > On 07/30/11 17:00, benjamin.peterson wrote: >> http://hg.python.org/cpython/rev/402f94edf11b >> changeset:   71637:402f94edf11b >> branch:      2.7 >> user:        Benjamin Peterson >> date:        Sat Jul 30 09:59:12 2011 -0500 >> summary: >>   note Ellipsis syntax >> >

Re: [Python-Dev] cpython (2.7): note Ellipsis syntax

2011-07-30 Thread Georg Brandl
On 07/30/11 17:00, benjamin.peterson wrote: > http://hg.python.org/cpython/rev/402f94edf11b > changeset: 71637:402f94edf11b > branch: 2.7 > user:Benjamin Peterson > date:Sat Jul 30 09:59:12 2011 -0500 > summary: > note Ellipsis syntax > > files: > Doc/library/stdtypes.r