mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +00:00
Patch #1552024: add decorator support to unparse.py demo script.
(backport from rev. 52488)
This commit is contained in:
parent
a0a50feea8
commit
a35f8e0538
2 changed files with 11 additions and 0 deletions
|
@ -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
|
||||||
- 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
|
||||||
|
|
||||||
- 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
|
||||||
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
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue