From: <fwi...@us...> - 2009-07-30 14:43:05
|
Revision: 6607 http://jython.svn.sourceforge.net/jython/?rev=6607&view=rev Author: fwierzbicki Date: 2009-07-30 14:42:55 +0000 (Thu, 30 Jul 2009) Log Message: ----------- Statement "try:" was not working in interactive mode. Added tests for the basic try: partial sentences. Modified Paths: -------------- trunk/jython/Lib/test/test_codeop.py trunk/jython/grammar/PythonPartial.g Modified: trunk/jython/Lib/test/test_codeop.py =================================================================== --- trunk/jython/Lib/test/test_codeop.py 2009-07-30 14:36:21 UTC (rev 6606) +++ trunk/jython/Lib/test/test_codeop.py 2009-07-30 14:42:55 UTC (rev 6607) @@ -195,6 +195,11 @@ ai("(a,b") ai("(a,b,") + ai("try:") + ai("try:\n pass\nexcept:") + ai("try:\n pass\nfinally:") + ai("try:\n pass\nexcept:\n pass\nfinally:") + def test_invalid(self): ai = self.assertInvalid ai("a b") Modified: trunk/jython/grammar/PythonPartial.g =================================================================== --- trunk/jython/grammar/PythonPartial.g 2009-07-30 14:36:21 UTC (rev 6606) +++ trunk/jython/grammar/PythonPartial.g 2009-07-30 14:42:55 UTC (rev 6607) @@ -522,7 +522,7 @@ : TRY COLON suite ( except_clause+ (ORELSE COLON suite)? (FINALLY COLON suite)? | FINALLY COLON suite - ) + )? ; //with_stmt: 'with' test [ with_var ] ':' suite This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |