[New-bugs-announce] [issue39993] Language Reference - Function definition parameter_list item definition not equivalent to implementation.

Michael S report at bugs.python.org
Tue Mar 17 09:08:22 EDT 2020


New submission from Michael S <michael.s011235 at gmail.com>:

I just read
 https://docs.python.org/3/reference/compound_stmts.html#function-definitions

The item parameter_list is defined as: 

parameter_list            ::=  defparameter ("," defparameter)* "," "/" ["," [parameter_list_no_posonly]] | parameter_list_no_posonly

This definition states that the "," "/" after ("," defparameter)* are mandatory. But this is not true in Python 3.8, because you can define a function as 

def f(a):
    pass

Did I miss something?

----------
assignee: docs at python
components: Documentation
messages: 364425
nosy: Michael S2, docs at python
priority: normal
severity: normal
status: open
title: Language Reference - Function definition parameter_list item definition not equivalent to implementation.
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39993>
_______________________________________


More information about the New-bugs-announce mailing list