[issue27042] Incorrect grammar for function definitions

2016-05-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 451dd29ebae3 by Benjamin Peterson in branch '3.5':
Backed out changeset 71ff2235bb4c (closes #27042)
https://hg.python.org/cpython/rev/451dd29ebae3

New changeset d13999a6be8c by Benjamin Peterson in branch '3.5':
class definitions only get argument lists (closes #27042)
https://hg.python.org/cpython/rev/d13999a6be8c

New changeset d384bf58f5f8 by Benjamin Peterson in branch 'default':
merge 3.5 (#27042)
https://hg.python.org/cpython/rev/d384bf58f5f8

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue27042] Incorrect grammar for function definitions

2016-05-16 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue27042] Incorrect grammar for function definitions

2016-05-16 Thread Eric Wieser

Eric Wieser added the comment:

The parent commit is also bad:

https://hg.python.org/cpython/rev/b65007ef59c0

--

___
Python tracker 

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



[issue27042] Incorrect grammar for function definitions

2016-05-16 Thread Eric Wieser

Eric Wieser added the comment:

The offending patch can be found at 
https://hg.python.org/cpython/rev/71ff2235bb4c

--

___
Python tracker 

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



[issue27042] Incorrect grammar for function definitions

2016-05-16 Thread Eric Wieser

New submission from Eric Wieser:

https://docs.python.org/3.2/reference/compound_stmts.html#function-definitions 

and onwards say the following

decorator  ::=  "@" dotted_name ["(" [parameter_list [","]] ")"] NEWLINE

This is a regression from the 2.7 docs, which correctly said

decorator  ::=  "@" dotted_name ["(" [argument_list [","]] ")"] NEWLINE

The implication is that the following is supposedly valid in python 3:

@deco(what : "is this" = "supposed to mean")
def foo(annotations: "are only for here" = "right?"):
pass

The interpreter disagrees with the docs, and correctly rejects this syntax as 
garbage

--
assignee: docs@python
components: Documentation
messages: 265735
nosy: Eric.Wieser, docs@python
priority: normal
severity: normal
status: open
title: Incorrect grammar for function definitions
versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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