diff options
| author | strank <strank@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2008-07-28 15:24:27 +0000 |
|---|---|---|
| committer | strank <strank@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2008-07-28 15:24:27 +0000 |
| commit | 2ec2ed70dfae0edfb9c8df437cfa20b41e971fd1 (patch) | |
| tree | 94b3b00b24408e3df8c0ef6ade26549f7355dcec /docutils/readers/python/moduleparser.py | |
| parent | ce856ebd1cf2b6781a5c84b4627db2e47c9ffa04 (diff) | |
| download | docutils-2ec2ed70dfae0edfb9c8df437cfa20b41e971fd1.tar.gz | |
Merged trunk r5043:5619 to adjacent-citations branch.
git-svn-id: http://svn.code.sf.net/p/docutils/code/branches/adjacent-citations@5621 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/readers/python/moduleparser.py')
| -rw-r--r-- | docutils/readers/python/moduleparser.py | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/docutils/readers/python/moduleparser.py b/docutils/readers/python/moduleparser.py index 5e63c9876..fadb3586b 100644 --- a/docutils/readers/python/moduleparser.py +++ b/docutils/readers/python/moduleparser.py @@ -53,78 +53,78 @@ The module parser will produce this module documentation tree:: <docstring lineno="5"> Additional docstring <attribute lineno="7"> - <object_name> - __docformat__ + <object_name> + __docformat__ <expression_value lineno="7"> 'reStructuredText' <attribute lineno="9"> - <object_name> - a + <object_name> + a <expression_value lineno="9"> 1 <docstring lineno="10"> Attribute docstring <class_section lineno="12"> - <object_name> - C + <object_name> + C <class_base> - Super + Super <docstring lineno="12"> C's docstring <attribute lineno="16"> - <object_name> - class_attribute + <object_name> + class_attribute <expression_value lineno="16"> 1 <docstring lineno="17"> class_attribute's docstring <method_section lineno="19"> - <object_name> - __init__ + <object_name> + __init__ <docstring lineno="19"> __init__'s docstring <parameter_list lineno="19"> <parameter lineno="19"> - <object_name> - self + <object_name> + self <parameter lineno="19"> - <object_name> - text + <object_name> + text <parameter_default lineno="19"> None <attribute lineno="22"> - <object_name> - self.instance_attribute + <object_name> + self.instance_attribute <expression_value lineno="22"> (text * 7 + ' whaddyaknow') <docstring lineno="24"> instance_attribute's docstring <function_section lineno="27"> - <object_name> - f + <object_name> + f <docstring lineno="27"> f's docstring <parameter_list lineno="27"> <parameter lineno="27"> - <object_name> - x + <object_name> + x <comment> # parameter x <parameter lineno="27"> - <object_name> - y + <object_name> + y <parameter_default lineno="27"> a * 5 <comment> # parameter y <parameter excess_positional="1" lineno="27"> - <object_name> - args + <object_name> + args <comment> # parameter args <attribute lineno="33"> - <object_name> - f.function_attribute + <object_name> + f.function_attribute <expression_value lineno="33"> 1 <docstring lineno="34"> @@ -525,14 +525,14 @@ class TokenParser: def note_token(self): if self.type == tokenize.NL: return - del_ws = self.del_ws_prefix.has_key(self.string) - append_ws = not self.no_ws_suffix.has_key(self.string) - if self.openers.has_key(self.string): + del_ws = self.string in self.del_ws_prefix + append_ws = self.string not in self.no_ws_suffix + if self.string in self.openers: self.stack.append(self.string) if (self._type == token.NAME - or self.closers.has_key(self._string)): + or self._string in self.closers): del_ws = 1 - elif self.closers.has_key(self.string): + elif self.string in self.closers: assert self.stack[-1] == self.closers[self.string] self.stack.pop() elif self.string == '`': |
