Re: PEP 3102 for review and comment

2006-05-24 Thread Kay Schluehr
molasses wrote: > I don't mind the naked star and will be happy if thats what we end up with. > > Though how about using *None? > I think that makes the intention of the function clearer. > > eg. > def compare(a, b, *None, key=None): > > Which to me reads as "no further positional arguments". > >

Re: PEP 3102 for review and comment

2006-05-24 Thread gangesmaster
None is not currently a keyword -- http://mail.python.org/mailman/listinfo/python-list

PEP 3102 for review and comment

2006-05-24 Thread molasses
I don't mind the naked star and will be happy if thats what we end up with. Though how about using *None? I think that makes the intention of the function clearer. eg. def compare(a, b, *None, key=None): Which to me reads as "no further positional arguments". Or alternatively: def compare(a, b,

Re: PEP 3102 for review and comment

2006-05-22 Thread Talin
Allowing keyword arguments without defaults may seem like a syntactical change, but in fact it's not. You can do this in Python now - any argument can be a 'keyword' argument, whether it has a default value or not. So for example: def func( a, b, c=0 ): pass func( a=1, b=2, c=3 ) In other wor

Re: PEP 3102 for review and comment

2006-05-22 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, "Talin" <[EMAIL PROTECTED]> wrote: > (Note: PEPs in the 3xxx number range are intended for Python 3000, > however this particular PEP may be backported if there is support for > it.) > > PEP: 3102 > Title: Keyword-Only Arguments ... > Syntactically, the propos

Re: PEP 3102 for review and comment

2006-05-20 Thread Carl Banks
Talin wrote: > Specification > > Syntactically, the proposed changes are fairly simple. The first > change is to allow regular arguments to appear after a varargs > argument: > > def sortwords(*wordlist, case_sensitive=False): >... > > This function accepts any

PEP 3102 for review and comment

2006-05-19 Thread Talin
(Note: PEPs in the 3xxx number range are intended for Python 3000, however this particular PEP may be backported if there is support for it.) PEP: 3102 Title: Keyword-Only Arguments Version: $Revision: 46053 $ Last-Modified: $Date: 2006-05-19 22:23:44 -0700 (Fri, 19 May 2006) $ Author: Talin Stat