summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-10-27 20:39:47 +0000
committerGeorg Brandl <georg@python.org>2006-10-27 20:39:47 +0000
commita35f8e05382aa53b98f423b918ae5f4bd030923a (patch)
tree7a168448c630c4e24c8376d3b67bf044e3f65060
parenta0a50feea816fef21c525212dd867f7d7f3f9ab4 (diff)
downloadcpython-git-a35f8e05382aa53b98f423b918ae5f4bd030923a.tar.gz
Patch #1552024: add decorator support to unparse.py demo script.
(backport from rev. 52488)
-rw-r--r--Demo/parser/unparse.py3
-rw-r--r--Misc/NEWS8
2 files changed, 11 insertions, 0 deletions
diff --git a/Demo/parser/unparse.py b/Demo/parser/unparse.py
index 510cdb07ba..f4dd90c95e 100644
--- a/Demo/parser/unparse.py
+++ b/Demo/parser/unparse.py
@@ -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(")")
diff --git a/Misc/NEWS b/Misc/NEWS
index 9ad45fc6f1..4150444c7e 100644
--- 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
-----