[issue2613] inconsistency with bare * in parameter list

2016-08-23 Thread Guido van Rossum

Guido van Rossum added the comment:

I promise you it's not necessary in that example. Leaving out the '*' has the 
same effect as what you intend there.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2613] inconsistency with bare * in parameter list

2016-08-23 Thread vitorg

vitorg added the comment:

Here is example where it's necessary, but still raising an error:
>>> def my_method(self, *, **kwargs):
... pass
... 
  File "", line 1
SyntaxError: named arguments must follow bare *

--
nosy: +vitorg

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2613] inconsistency with bare * in parameter list

2008-06-04 Thread Buck Golemon

Buck Golemon [EMAIL PROTECTED] added the comment:

/agree

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2613
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2613] inconsistency with bare * in parameter list

2008-06-03 Thread Terry J. Reedy

Terry J. Reedy [EMAIL PROTECTED] added the comment:

Rationale for banning f(*,**k): it could represent a bug (intended bare
name(s) omitted) that should be flagged, a lack of clear understanding
of the redundancy, or a somewhat unPythonic stylistic preference for
useless redundancy.  I consider the first the most likely in practice,
though I also did not see the redundancy at first.  Guido has used the
'likely a bug' rationale for other design decisions.

--
nosy: +tjreedy

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2613
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2613] inconsistency with bare * in parameter list

2008-05-27 Thread Guido van Rossum

Guido van Rossum [EMAIL PROTECTED] added the comment:

I see it differently. The rule is simply that if you use a bare * you
*must* follow it with at least one argument (that's not **k).  This
makes sense since otherwise the * is redundant.  Think about it; there
is nothing different between

def g(*, **kwds): ...

and

def g(**kwds): ...

--
resolution:  - invalid
status: open - closed

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2613
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2613] inconsistency with bare * in parameter list

2008-05-27 Thread Buck Golemon

Buck Golemon [EMAIL PROTECTED] added the comment:

If there's no difference then they should work the same?
I agree there's probably little value in 'fixing' it.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2613
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2613] inconsistency with bare * in parameter list

2008-04-11 Thread Mark Summerfield

New submission from Mark Summerfield [EMAIL PROTECTED]:

A bare * in a parameter list behaves differently depending on what
follows it:

Py30a4:

 def f(*, a=1, b=2): return 1

 def g(*, **kwargs): return 1
SyntaxError: named arguments must follow bare * (pyshell#10, line 1)

I don't know if this is a bug or not but thought it worth querying. This
case does not seem to be mentioned in PEP 3102.

--
components: Interpreter Core
messages: 65340
nosy: mark
severity: normal
status: open
title: inconsistency with bare * in parameter list
type: behavior
versions: Python 3.0

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2613
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com