diff options
author | Kenn Knowles <kenn.knowles@gmail.com> | 2013-03-22 13:42:56 -0400 |
---|---|---|
committer | Kenn Knowles <kenn.knowles@gmail.com> | 2013-03-22 13:42:56 -0400 |
commit | d9906bb07dbbb0f597d18b42134d8c3067bde4d5 (patch) | |
tree | ded5257ab6ae871741d0082d172d642a3d90e098 | |
parent | f5e6e398104f3db2e28a642f1f40604b70aaf8fa (diff) | |
download | jsonpath-rw-d9906bb07dbbb0f597d18b42134d8c3067bde4d5.tar.gz |
Minor simplification to This
-rw-r--r-- | jsonpath_rw/jsonpath.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/jsonpath_rw/jsonpath.py b/jsonpath_rw/jsonpath.py index f793366..ce1bfcc 100644 --- a/jsonpath_rw/jsonpath.py +++ b/jsonpath_rw/jsonpath.py @@ -187,11 +187,8 @@ class This(JSONPath): The JSONPath referring to the current datum. Concrete syntax is '@'. """ - def find(self, data): - if isinstance(data, DatumInContext): - return [data] - else: - return [DatumInContext(data, path=This(), context=None)] + def find(self, datum): + return DatumInContext.wrap(datum) def update(self, data, val): return val |