Emulation of the work of the namespace in Python
[1] Valentyn N Sichkar. Emulation of the work of the namespace in Python // GitHub platform [Electronic resource]. URL: https://github.com/sichkar-valentyn/Namespaces_in_Python (date of access: XX.XX.XXXX)
In this task, each namespace has a unique text identifier – its name.
The following requests are submitted to the program for entry:
create < namespace > < parent > - create a new namespace named < namespace > inside the space
add < namespace > < var> - add the < var >variable to the
get < namespace > < var > - get the name of the space from which the < var > variable will be taken when queried from the < namespace > space, or None if no such space exists
Input format:
9
add global a
create foo global
add foo b
get foo a
get foo c
create bar foo
add bar a
get bar a
get bar b
Output:
global
None
bar
foo
[1] Valentyn N Sichkar. Emulation of the work of the namespace in Python // GitHub platform [Electronic resource]. URL: https://github.com/sichkar-valentyn/Namespaces_in_Python (date of access: XX.XX.XXXX)