mirror of https://github.com/python/cpython
merge 3.2
This commit is contained in:
commit
a883e566ac
|
@ -427,7 +427,7 @@ A function definition defines a user-defined function object (see section
|
|||
.. productionlist::
|
||||
funcdef: [`decorators`] "def" `funcname` "(" [`parameter_list`] ")" ["->" `expression`] ":" `suite`
|
||||
decorators: `decorator`+
|
||||
decorator: "@" `dotted_name` ["(" [`argument_list` [","]] ")"] NEWLINE
|
||||
decorator: "@" `dotted_name` ["(" [`parameter_list` [","]] ")"] NEWLINE
|
||||
dotted_name: `identifier` ("." `identifier`)*
|
||||
parameter_list: (`defparameter` ",")*
|
||||
: ( "*" [`parameter`] ("," `defparameter`)*
|
||||
|
@ -554,7 +554,7 @@ A class definition defines a class object (see section :ref:`types`):
|
|||
|
||||
.. productionlist::
|
||||
classdef: [`decorators`] "class" `classname` [`inheritance`] ":" `suite`
|
||||
inheritance: "(" [`argument_list` [","] | `comprehension`] ")"
|
||||
inheritance: "(" [`parameter_list`] ")"
|
||||
classname: `identifier`
|
||||
|
||||
A class definition is an executable statement. The inheritance list usually
|
||||
|
|
Loading…
Reference in New Issue