[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2021-09-06 Thread Irit Katriel


Irit Katriel  added the comment:

This doc has changed, and it's now like this:

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

--
nosy: +iritkatriel
resolution:  -> out of date
stage: needs patch -> 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



[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2016-12-29 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

Further patch for 3.6 and 3.7 to address `defparameter` change here too.

--
Added file: http://bugs.python.org/file46078/3.6_3.7_func_def.patch

___
Python tracker 

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



[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2016-12-29 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

Further patch for `3.4` and `3.5`:

Change `|` to `(` and fix `defparameter` to use `+`

--
Added file: http://bugs.python.org/file46077/3.4_3.5_func_def.patch

___
Python tracker 

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



[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2016-12-29 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

Attached patche for Python 3.3 (change `defparameter` to use `+`).

--
keywords: +patch
Added file: http://bugs.python.org/file46076/3.3_func_def.patch

___
Python tracker 

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



[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2016-12-24 Thread Martin Panter

Changes by Martin Panter :


--
stage:  -> needs patch
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2016-12-15 Thread R. David Murray

R. David Murray added the comment:

Ah, I see.  (", " defparameter)* should instead be "+", or whatever the BNF 
equivalent is.

--

___
Python tracker 

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



[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2016-12-15 Thread woo yoo

woo yoo added the comment:

Code:
>>>def f(a, *):
>>>print(a)

(SyntaxError occurs here)

--

___
Python tracker 

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



[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2016-12-15 Thread R. David Murray

R. David Murray added the comment:

What do you mean by "a bare * followed by no parameters"?  That is, what is the 
thing that is considered invalid that you are saying the BNF rules allow?  I'm 
looking for a code snipped that produces a syntax error.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2016-12-15 Thread woo yoo

woo yoo added the comment:

Nor the rules in Python-3.6.0 excludes the bare '*' following no parameters.

--

___
Python tracker 

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



[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2016-12-15 Thread woo yoo

woo yoo added the comment:

There is  a few difference between Python-3.5.2 and Python-3.6.2 concerning the 
EBNF rules even though the parenthesis bug is fixed.

--

___
Python tracker 

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



[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2016-12-15 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

See issue<9232> that changed the docs on function definitions. These changes 
aren't reflected in the 3.5 documentation though, you'll find them in the 3.6 
docs.

The linked grammar is probably missing an opening parentheses from what I can 
tell, i.e change | to (:

( "*" [parameter] ("," defparameter)* ["," "**" parameter]

--
nosy: +Jim Fasarakis-Hilliard

___
Python tracker 

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



[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2016-12-15 Thread woo yoo

woo yoo added the comment:

And i find that the current rules of parameter_list includes a bare '*',which 
is illegal in practice.

--

___
Python tracker 

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



[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2016-12-15 Thread woo yoo

woo yoo added the comment:

Just the right parenthesis is redundant, ignore other words.

--

___
Python tracker 

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



[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2016-12-15 Thread woo yoo

woo yoo added the comment:

Here is the link 
https://docs.python.org/3/reference/compound_stmts.html#function-definitions

--

___
Python tracker 

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



[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2016-12-15 Thread woo yoo

New submission from woo yoo:

Quote the documentation as below:

> parameter_list ::=  (defparameter ",")*
| "*" [parameter] ("," defparameter)* ["," "**" parameter]
| "**" parameter
| defparameter [","] )

The last right parenthesis is redundant.And the second alternative form is not 
complete, it does not incorporate a case that only include starred parameter.

--
assignee: docs@python
components: Documentation
messages: 283288
nosy: docs@python, woo yoo
priority: normal
severity: normal
status: open
title: a redundant right  parentheses in the EBNF rules of parameter_list
versions: Python 3.5

___
Python tracker 

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