From 8d98dfea58df43b1a4cf691293b55b656669766a Mon Sep 17 00:00:00 2001 From: Shmuel Melamud Date: Sun, 17 Mar 2024 00:46:33 +0200 Subject: [PATCH] Added shorten() and expand() Python functions. --- _data/py_naming_classes.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/_data/py_naming_classes.yml b/_data/py_naming_classes.yml index ec85849..14ac8ea 100644 --- a/_data/py_naming_classes.yml +++ b/_data/py_naming_classes.yml @@ -72,6 +72,26 @@ functions: If the node name does not include a generation, generation 0 is returned. If name syntax is invalid, ValueError is raised. + - name: shorten(node_name) + params: + - name: node_name + type: str | None + description: the node name in compact or full form + out: + type: str | None + description: the node name in the compact form + description: Converts the node name to the compact form, omitting generation 0. + + - name: expand(node_name) + params: + - name: node_name + type: str | None + description: the node name in compact or full form + out: + type: str | None + description: the node name in the full form + description: Converts the node name to the full form, containing generation. + - name: resolve(name, naming_server=MAIN_SERVER) params: - name: name