Skip to content

sichkar-valentyn/Namespaces_in_Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Namespaces in Python

Emulation of the work of the namespace in Python

Reference to:

[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)

Description

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

MIT License

Copyright (c) 2018 Valentyn N Sichkar

github.com/sichkar-valentyn

Reference to:

[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)

About

Emulation of the work of the namespace in Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages