From 2ec2ed70dfae0edfb9c8df437cfa20b41e971fd1 Mon Sep 17 00:00:00 2001 From: strank Date: Mon, 28 Jul 2008 15:24:27 +0000 Subject: 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 --- docutils/readers/python/moduleparser.py | 64 ++++++++++++++++----------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'docutils/readers/python/moduleparser.py') 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:: Additional docstring - - __docformat__ + + __docformat__ 'reStructuredText' - - a + + a 1 Attribute docstring - - C + + C - Super + Super C's docstring - - class_attribute + + class_attribute 1 class_attribute's docstring - - __init__ + + __init__ __init__'s docstring - - self + + self - - text + + text None - - self.instance_attribute + + self.instance_attribute (text * 7 + ' whaddyaknow') instance_attribute's docstring - - f + + f f's docstring - - x + + x # parameter x - - y + + y a * 5 # parameter y - - args + + args # parameter args - - f.function_attribute + + f.function_attribute 1 @@ -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 == '`': -- cgit v1.2.1