Kaydet (Commit) a35f8e05 authored tarafından Georg Brandl's avatar Georg Brandl

Patch #1552024: add decorator support to unparse.py demo script.

 (backport from rev. 52488)
üst a0a50fee
...@@ -223,6 +223,9 @@ class Unparser: ...@@ -223,6 +223,9 @@ class Unparser:
def _FunctionDef(self, t): def _FunctionDef(self, t):
self.write("\n") self.write("\n")
for deco in t.decorators:
self.fill("@")
self.dispatch(deco)
self.fill("def "+t.name + "(") self.fill("def "+t.name + "(")
self.dispatch(t.args) self.dispatch(t.args)
self.write(")") self.write(")")
......
...@@ -57,6 +57,7 @@ Core and builtins ...@@ -57,6 +57,7 @@ Core and builtins
- fixed a bug with bsddb.DB.stat: the flags and txn keyword arguments - fixed a bug with bsddb.DB.stat: the flags and txn keyword arguments
were transposed. were transposed.
Extension Modules Extension Modules
----------------- -----------------
...@@ -83,6 +84,7 @@ Extension Modules ...@@ -83,6 +84,7 @@ Extension Modules
- Make regex engine raise MemoryError if allocating memory fails. - Make regex engine raise MemoryError if allocating memory fails.
Library Library
------- -------
...@@ -124,6 +126,12 @@ Library ...@@ -124,6 +126,12 @@ Library
the close_fds arg to subprocess.Popen is not supported). the close_fds arg to subprocess.Popen is not supported).
Tools/Demos
-----------
- Patch #1552024: add decorator support to unparse.py demo script.
Tests Tests
----- -----
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment