Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue7362] Incorrect error message with def((x)=0)

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Nov 19, 2009, 12:54 PM

Post #1 of 2 (134 views)
Permalink
[issue7362] Incorrect error message with def((x)=0)

New submission from James Lingard <jchl [at] aristanetworks>:

def f((x)=0): pass

gives the following incorrect error message:

SyntaxError: non-default argument follows default argument

"def f((x)): pass" is treated exactly the same as "def f(x): pass", so
it would seem sensible for the same to be true if a default value is
used. But if this syntax is disallowed for some reason, the error
message should be fixed.

This appears to be related to bug #1557232.

[Tested on Python 2.6 (r26:66714, Jun 8 2009, 16:07:29).]

----------
components: Interpreter Core
messages: 95514
nosy: james.lingard
severity: normal
status: open
title: Incorrect error message with def((x)=0)
type: behavior
versions: Python 2.6

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7362>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 19, 2009, 2:55 PM

Post #2 of 2 (122 views)
Permalink
[issue7362] Incorrect error message with def((x)=0) [In reply to]

Benjamin Peterson <benjamin [at] python> added the comment:

Fixed in r76416.

----------
nosy: +benjamin.peterson
resolution: -> fixed
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7362>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.