]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch #1552024: add decorator support to unparse.py demo script.
authorGeorg Brandl <georg@python.org>
Fri, 27 Oct 2006 20:39:43 +0000 (20:39 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 27 Oct 2006 20:39:43 +0000 (20:39 +0000)
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 d11966781df5fe6a56b01129e5e66ede5b5dfb93..05930e96da2fa35581f38dcecaa6c6c75b738bbd 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -156,6 +156,7 @@ Library
 - fixed a bug with bsddb.DB.stat: the flags and txn keyword arguments
   were transposed.
 
+
 Extension Modules
 -----------------
 
@@ -225,8 +226,10 @@ Documentation
   to a newly created list object and add notes that this isn't a good idea.
 
 
-Tools
------
+Tools/Demos
+-----------
+
+- Patch #1552024: add decorator support to unparse.py demo script.
 
 - Make auto-generated python.vim file list built-ins and exceptions in
   alphatbetical order.  Makes output more deterministic and easier to tell if