diff options
author | Paul McGuire <ptmcg@austin.rr.com> | 2015-12-13 19:15:06 +0000 |
---|---|---|
committer | Paul McGuire <ptmcg@austin.rr.com> | 2015-12-13 19:15:06 +0000 |
commit | 019fffcc5de6954cc74f42449ceb16bf9ed572f2 (patch) | |
tree | 2ed06463e4d76b192fda53bc9835b15c556dd9da /src/pyparsing.py | |
parent | b1567512dcfae81b7eb1ca18aca6e99097e9eea5 (diff) | |
download | pyparsing-git-019fffcc5de6954cc74f42449ceb16bf9ed572f2.tar.gz |
Fixed up implementations of __dir__ to reduce maintenance overhead, and fix output of ParseResults instance dirs.
Diffstat (limited to 'src/pyparsing.py')
-rw-r--r-- | src/pyparsing.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/pyparsing.py b/src/pyparsing.py index 3366b8a..9d697dd 100644 --- a/src/pyparsing.py +++ b/src/pyparsing.py @@ -58,7 +58,7 @@ The pyparsing module handles some of the problems that are typically vexing when """
__version__ = "2.0.7"
-__versionTime__ = "25 Nov 2015 09:02"
+__versionTime__ = "13 Dec 2015 13:09"
__author__ = "Paul McGuire <ptmcg@users.sourceforge.net>"
import string
@@ -205,8 +205,7 @@ class ParseBaseException(Exception): markerString, line_str[line_column:]))
return line_str.strip()
def __dir__(self):
- return "loc msg pstr parserElement lineno col line " \
- "markInputline __str__ __repr__".split()
+ return "lineno col line".split() + dir(type(self))
class ParseException(ParseBaseException):
"""exception thrown when parse expressions don't match class;
@@ -684,7 +683,7 @@ class ParseResults(object): self.__parent = None
def __dir__(self):
- return dir(super(ParseResults,self)) + list(self.keys())
+ return (dir(type(self)) + list(self.keys()))
collections.MutableMapping.register(ParseResults)
|