Patch #1552024: add decorator support to unparse.py demo script.
(backport from rev. 52488)
diff --git a/Demo/parser/unparse.py b/Demo/parser/unparse.py
index 510cdb0..f4dd90c 100644
--- a/Demo/parser/unparse.py
+++ b/Demo/parser/unparse.py
@@ -223,6 +223,9 @@
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(")")
diff --git a/Misc/NEWS b/Misc/NEWS
index 9ad45fc..4150444 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -57,6 +57,7 @@
- fixed a bug with bsddb.DB.stat: the flags and txn keyword arguments
were transposed.
+
Extension Modules
-----------------
@@ -83,6 +84,7 @@
- Make regex engine raise MemoryError if allocating memory fails.
+
Library
-------
@@ -124,6 +126,12 @@
the close_fds arg to subprocess.Popen is not supported).
+Tools/Demos
+-----------
+
+- Patch #1552024: add decorator support to unparse.py demo script.
+
+
Tests
-----