diff options
author | Brett Cannon <bcannon@gmail.com> | 2005-03-05 06:47:57 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2005-03-05 06:47:57 (GMT) |
commit | 409d8f2ebdf597837c593a40659949e5b15f457d (patch) | |
tree | 65efd1daca556adb53a28d3957ba57dc801e0dda /Grammar | |
parent | 653a5adcca68d445b21dd2a640627f0f0185204a (diff) | |
download | cpython-409d8f2ebdf597837c593a40659949e5b15f457d.zip cpython-409d8f2ebdf597837c593a40659949e5b15f457d.tar.gz cpython-409d8f2ebdf597837c593a40659949e5b15f457d.tar.bz2 |
Allow classes to be defined with empty parentheses. This means that
``class C(): pass`` is no longer a syntax error.
Diffstat (limited to 'Grammar')
-rw-r--r-- | Grammar/Grammar | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar index 9e4dad8..7b6acf7 100644 --- a/Grammar/Grammar +++ b/Grammar/Grammar @@ -99,7 +99,7 @@ testlist: test (',' test)* [','] testlist_safe: test [(',' test)+ [',']] dictmaker: test ':' test (',' test ':' test)* [','] -classdef: 'class' NAME ['(' testlist ')'] ':' suite +classdef: 'class' NAME ['(' [testlist] ')'] ':' suite arglist: (argument ',')* (argument [',']| '*' test [',' '**' test] | '**' test) argument: [test '='] test [gen_for] # Really [keyword '='] test |