mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-01-15 18:03:31 +01:00
StringTree.__getitem__(): Return value child
StringTree.__getitem__() returned the node, now return its value child instead. That's nicer and closer to the expected behaviour, as it supports StringTree usage as a key-value store for configuration or so. It breaks the existing API, but I think I have fixed the only pace where it was used: jw-grammar/grammar.py. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
edf861c985
commit
fb6b205440
1 changed files with 1 additions and 1 deletions
|
|
@ -113,7 +113,7 @@ class StringTree: # export
|
|||
r = self.get(path)
|
||||
if r is None:
|
||||
raise KeyError(path)
|
||||
return r
|
||||
return r.value()
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
return self.__set(key, value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue