]> granicus.if.org Git - python/commitdiff
Patch #1552024: add decorator support to unparse.py demo script.
authorGeorg Brandl <georg@python.org>
Fri, 27 Oct 2006 20:39:47 +0000 (20:39 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 27 Oct 2006 20:39:47 +0000 (20:39 +0000)
 (backport from rev. 52488)

Demo/parser/unparse.py
Misc/NEWS

index 510cdb07ba11affb5ff66c8321ce32dba431a464..f4dd90c95ee07a1971996d3413fc67cec0c543c7 100644 (file)
@@ -223,6 +223,9 @@ class Unparser:
 
     def _FunctionDef(self, t):
         self.write("\n")
+        for deco in t.decorators:
+            self.fill("@")
+            self.dispatch(deco)
         self.fill("def "+t.name + "(")
         self.dispatch(t.args)
         self.write(")")
index 9ad45fc6f1397e8c54938b44fe54f3cdbdb380b2..4150444c7ebbaa6f3d6d0cbc92920414137fa03a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -57,6 +57,7 @@ Core and builtins
 - fixed a bug with bsddb.DB.stat: the flags and txn keyword arguments
   were transposed.
 
+
 Extension Modules
 -----------------
 
@@ -83,6 +84,7 @@ Extension Modules
 
 - Make regex engine raise MemoryError if allocating memory fails.
 
+
 Library
 -------
 
@@ -124,6 +126,12 @@ Library
   the close_fds arg to subprocess.Popen is not supported).
 
 
+Tools/Demos
+-----------
+
+- Patch #1552024: add decorator support to unparse.py demo script.
+
+
 Tests
 -----