diff options
author | strank <strank@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2008-07-23 19:18:19 +0000 |
---|---|---|
committer | strank <strank@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2008-07-23 19:18:19 +0000 |
commit | 909813ea5e93a2ce8809737f60791560b33c1e85 (patch) | |
tree | 8d6fc47c20f6d73499d1b8f1d0d7e4fd2deefdfc /readers/python/moduleparser.py | |
parent | 537774fff163c1bbb528f4ac3c92ce42feacb33d (diff) | |
download | docutils-abolish-userstring.tar.gz |
Replace all has_key with the in operator.abolish-userstring
git-svn-id: http://svn.code.sf.net/p/docutils/code/branches/abolish-userstring@5607 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'readers/python/moduleparser.py')
-rw-r--r-- | readers/python/moduleparser.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/readers/python/moduleparser.py b/readers/python/moduleparser.py index e874ee204..fadb3586b 100644 --- a/readers/python/moduleparser.py +++ b/readers/python/moduleparser.py @@ -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 == '`': |