[Python-checkins] python/nondist/peps pep-0288.txt,1.4,1.5

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Mon Jan 3 05:59:24 CET 2005


Update of /cvsroot/python/python/nondist/peps
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28765

Modified Files:
	pep-0288.txt 
Log Message:
Simplify the proposal for gen.throw().

Index: pep-0288.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0288.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- pep-0288.txt	2 Jan 2005 21:41:54 -0000	1.4
+++ pep-0288.txt	3 Jan 2005 04:59:21 -0000	1.5
@@ -119,17 +119,12 @@
     genraise(), raiseinto(), and flush().  None of these fit as well
     as throw().
 
-    Note B: The full throw() syntax should exactly match raise's syntax:
-
-        throw([expression, [expression, [expression]]])
-
-    Accordingly, it should be implemented to handle all of the following:
+    Note B:  To keep the throw() syntax simple only the instance
+    version of the raise syntax would be supported (no variants for
+    "raise string" or "raise class, instance").
 
-        raise string                    g.throw(string)
-        raise string, data              g.throw(string,data)
-        raise class, instance           g.throw(class,instance)
-        raise instance                  g.throw(instance)
-        raise                           g.throw()
+    Calling "g.throw(instance)" would correspond to writing
+    "raise instance" immediately after the most recent yield.
 
 
 



More information about the Python-checkins mailing list