Skip to content
Snippets Groups Projects
Commit d7324c24 authored by Sean Farley's avatar Sean Farley
Browse files

namespaces: add __getitem__ property

Since the namespaces object uses an underlying (sorted) dictionary to store the
namespaces, it makes sense to expose this to naturally gain access to those
namespaces.
parent b9d06fa1
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,10 @@
lambda repo, node: [repo[node].branch()])
self.addnamespace(n)
def __getitem__(self, namespace):
"""returns the namespace object"""
return self._names[namespace]
def addnamespace(self, namespace, order=None):
"""register a namespace
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment