[Python-checkins] python/dist/src/Grammar Grammar,1.50,1.51

mwh at users.sourceforge.net mwh at users.sourceforge.net
Tue Aug 17 19:29:31 CEST 2004


Update of /cvsroot/python/python/dist/src/Grammar
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1056/Grammar

Modified Files:
	Grammar 
Log Message:
This is Mark Russell's patch:

[ 1009560 ] Fix @decorator evaluation order

>From the description:

Changes in this patch:

- Change Grammar/Grammar to require
newlines between adjacent decorators.

- Fix order of evaluation of decorators
in the C (compile.c) and python
(Lib/compiler/pycodegen.py) compilers

- Add better order of evaluation check
to test_decorators.py (test_eval_order)

- Update the decorator documentation in
the reference manual (improve description
of evaluation order and update syntax
description)

and the comment:

Used Brett's evaluation order (see
http://mail.python.org/pipermail/python-dev/2004-August/047835.html)

(I'm checking this in for Anthony who was having problems getting SF to
talk to him)


Index: Grammar
===================================================================
RCS file: /cvsroot/python/python/dist/src/Grammar/Grammar,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** Grammar	2 Aug 2004 06:09:53 -0000	1.50
--- Grammar	17 Aug 2004 17:29:14 -0000	1.51
***************
*** 29,34 ****
  eval_input: testlist NEWLINE* ENDMARKER
  
! decorator: '@' dotted_name [ '(' [arglist] ')' ]
! decorators: decorator ([NEWLINE] decorator)* NEWLINE
  funcdef: [decorators] 'def' NAME parameters ':' suite
  parameters: '(' [varargslist] ')'
--- 29,34 ----
  eval_input: testlist NEWLINE* ENDMARKER
  
! decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE
! decorators: decorator+
  funcdef: [decorators] 'def' NAME parameters ':' suite
  parameters: '(' [varargslist] ')'



More information about the Python-checkins mailing list