fixed typo

This commit is contained in:
hellerve
2017-01-17 15:35:17 +01:00
parent 9f27d77a8e
commit 4eac5c0a32

View File

@@ -50,20 +50,22 @@ A few motivating examples (a more exhaustive list can be found in the ``test`` d
# => {"k": [1, [3], 3]} (will create a copy of the data)
manipulator.set([{"k": "v"},
{"k": {
"a": [{"k": 10}, {"k": 11}]
}
{
"k": {
"a": [{"k": 10}, {"k": 11}]
}
}], ".k #1 #a .k", 100)
# => [{"k": "v"}, {"k": {"a": [{"k": 100}, {"k": 100}]}}]
manipulator.update({"k": [1, [2], 3]}, "#k #1 #0", lambda x: x-1)
# => {"k": [1, [1], 3]} (in place, use in_place=False to copy)
manipulator.set([{"k": "v"},
{"k": {
"a": [{"k": 10}, {"k": 11}]
}
}], ".k #1 #a .k", lambda x: x+1)
manipulator.update([{"k": "v"},
{
"k": {
"a": [{"k": 10}, {"k": 11}]
}
}], ".k #1 #a .k", lambda x: x+1)
# => [{"k": "v"}, {"k": {"a": [{"k": 11}, {"k": 12}]}}]