| |
- builtins.object
-
- Namespace
class Namespace(builtins.object) |
|
Namespace(*names: str, delim: str = '.', parent: 'Namespace' = None) -> None
A class for implementing a basic namespace interface. |
|
Methods defined here:
- __init__(self, *names: str, delim: str = '.', parent: 'Namespace' = None) -> None
- Initialize this namespace.
- child(self, *names: str) -> 'Namespace'
- Create a child namespace from this one.
- length_sorted_suggestions(self, data: str, delta: bool = True) -> List[str]
- Get suggestions (based on data) sorted by length.
- namespace(self, name: str = None, delim: str = None, track: bool = True) -> str
- Get the current namespace string with or without an additional name
applied.
- pop(self, name: str = None) -> str
- Pop the latest name off the stack.
- push(self, name: str) -> None
- Push a name onto the stack.
- pushed(self, *names: str) -> Iterator[NoneType]
- Provide this namespace with some names pushed onto the stack as a
context.
- search(self, *names: str, pattern: str = '.*', recursive: bool = True, exact: bool = False) -> Iterator[str]
- Iterate over names in this namespace that match a given pattern.
- suggest(self, data: str, delta: bool = True) -> Optional[str]
- Find the shortest name suggestion.
- suggestions(self, data: str, delta: bool = True) -> Iterator[str]
- Iterate over un-ordered suggestions for a data string that is a
sub-string of one or more names in this namespace.
Readonly properties defined here:
- parents
- Iterate over parents.
Data descriptors defined here:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
| |