diff options
Diffstat (limited to 'redis/commands/json/path.py')
-rw-r--r-- | redis/commands/json/path.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/redis/commands/json/path.py b/redis/commands/json/path.py index dff8648..6d87045 100644 --- a/redis/commands/json/path.py +++ b/redis/commands/json/path.py @@ -1,11 +1,3 @@ -def str_path(p): - """Return the string representation of a path if it is of class Path.""" - if isinstance(p, Path): - return p.strPath - else: - return p - - class Path(object): """This class represents a path in a JSON value.""" @@ -19,3 +11,6 @@ class Path(object): def __init__(self, path): """Make a new path based on the string representation in `path`.""" self.strPath = path + + def __repr__(self): + return self.strPath |