[issue3913] compound_stmt syntax includes 'decorated'

2008-09-21 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

Bruce is right.

I fixed decorated, the duplicate funcdef and the ? in r66527 and
r66528.

Bruce, usually adding comments with more issues, especially if they are
so small, is fine; however, since they may be overlooked you're free to
open another bug after a time if no reaction happens.

--
resolution: invalid - fixed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3913
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3913] compound_stmt syntax includes 'decorated'

2008-09-19 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

If you look at the real Grammar (in Grammar/Grammar), you will see that
this decorated is used in the grammar.

--
nosy: +benjamin.peterson
resolution:  - invalid
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3913
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3913] compound_stmt syntax includes 'decorated'

2008-09-19 Thread Bruce Frederiksen

Bruce Frederiksen [EMAIL PROTECTED] added the comment:

But the real Grammar doesn't include decorators on funcdef and classdef, 
while the Language Reference document does.  So the 'decorated' option 
is not needed in the Language Reference (and, indeed, doesn't even seem 
to be defined there).

Benjamin Peterson wrote:
 Benjamin Peterson [EMAIL PROTECTED] added the comment:

 If you look at the real Grammar (in Grammar/Grammar), you will see that
 this decorated is used in the grammar.

 --
 nosy: +benjamin.peterson
 resolution:  - invalid
 status: open - closed

 ___
 Python tracker [EMAIL PROTECTED]
 http://bugs.python.org/issue3913
 ___



___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3913
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3913] compound_stmt syntax includes 'decorated'

2008-09-19 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

The language reference is merely a explanation of the the Grammar, so I
don't understand why you think it shouldn't be there. A 'decorated' node
contains a 'classdef' or 'fundef'.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3913
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3913] compound_stmt syntax includes 'decorated'

2008-09-19 Thread Bruce Frederiksen

Bruce Frederiksen [EMAIL PROTECTED] added the comment:

The grammar definitions in the Language Reference are _not_ just a 
straight copy of the Grammar.  They have been reworked.  (I don't know 
why, perhaps to make it easier to understand)?

So the Grammar defines funcdef and classdef _without_ decorators and 
then has a separate definition for decorated funcdefs and classdefs 
called 'decorated' that is another compound_stmt (along with funcdef and 
classdef).  (For Grammar, I'm looking at: 
http://docs.python.org/dev/3.0/reference/grammar.html).

The Language Reference defines both funcdef and classdef _with_ optional 
decorators, so the 'decorated' alternative for compound_stmt is no 
longer required and should be deleted.  The following links should take 
you straight to the funcdef and classdef definitions in the Language 
Reference:

http://docs.python.org/dev/3.0/reference/compound_stmts.html#grammar-token-funcdef
http://docs.python.org/dev/3.0/reference/compound_stmts.html#grammar-token-classdef

Now, I just also noticed that the Language Reference actually has two 
definitions of funcdef.  The second definition is 3 lines below the 
first one and fails to include either the optional decorators or the new 
[- expression] option after the argument list.  Should I report this 
as another bug, or does this comment count.  This second definition 
should be deleted.

Also, the first definition of funcdef in the Language Reference has an 
extraneous '?' character after the [- expression] which should also 
be deleted.  Should I report this as a separate bug too, or leave it, as 
well, to this comment?  (Sorry for asking whether to report these too, I 
don't know how strict you guys are about keeping a record of everything).

There are many other places where the grammar defined in the Language 
Reference is not a mirror copy of the Grammar (but is still an 
equivalent grammar).  In fact, this seems to be the rule, rather than 
the exception.  If you are unaware of this, you should examine the 
grammar definitions in the Language Reference and compare them to the 
Grammar yourself; or ask whoever is in charge of the Language Reference 
document.  I don't know why this was done, I'm just trying to point out 
that the Language Reference document has some (minor) bugs in it that 
are very easily fixed.

Benjamin Peterson wrote:
 Benjamin Peterson [EMAIL PROTECTED] added the comment:

 The language reference is merely a explanation of the the Grammar, so I
 don't understand why you think it shouldn't be there. A 'decorated' node
 contains a 'classdef' or 'fundef'.

 ___
 Python tracker [EMAIL PROTECTED]
 http://bugs.python.org/issue3913
 ___



___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3913
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com