diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-08-29 17:19:02 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-08-29 17:19:02 (GMT) |
commit | da8db8ca186ab8a811b44b90816b57b6f20caa61 (patch) | |
tree | 854e617a5baf5607c4b3f3d1c6d9f487a49da46c /Tools | |
parent | 8aea0cc94e1949a2fa06924d058a7d150238544a (diff) | |
download | cpython-da8db8ca186ab8a811b44b90816b57b6f20caa61.zip cpython-da8db8ca186ab8a811b44b90816b57b6f20caa61.tar.gz cpython-da8db8ca186ab8a811b44b90816b57b6f20caa61.tar.bz2 |
Don't include doc string of class in its code child
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/compiler/compiler/transformer.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Tools/compiler/compiler/transformer.py b/Tools/compiler/compiler/transformer.py index 7f6a1b4..7f61595 100644 --- a/Tools/compiler/compiler/transformer.py +++ b/Tools/compiler/compiler/transformer.py @@ -222,6 +222,11 @@ class Transformer: # code for class code = self.com_node(nodelist[-1]) + if doc is not None: + assert isinstance(code, Stmt) + assert isinstance(code.nodes[0], Discard) + del code.nodes[0] + n = Class(name, bases, doc, code) n.lineno = nodelist[1][2] return n |