adds example to helper function

This commit is contained in:
Mose Müller 2024-07-25 08:25:28 +02:00
parent fdb17e44e2
commit 1a23206f42

View File

@ -60,6 +60,10 @@ def parse_full_access_path(path: str) -> list[str]:
list[str]
A list of components that make up the path, including attribute names,
numeric indices, and string keys as separate elements.
Example:
>>> parse_full_access_path('dict_attr["some_key"].attr_name["other_key"]')
["dict_attr", '["some_key"]', "attr_name", '["other_key"]']
"""
# Matches:
# \w+ - Words