summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bindings/python/lilv.py3
-rw-r--r--bindings/test/python/test_api.py3
2 files changed, 6 insertions, 0 deletions
diff --git a/bindings/python/lilv.py b/bindings/python/lilv.py
index 8d3674e..ffea115 100644
--- a/bindings/python/lilv.py
+++ b/bindings/python/lilv.py
@@ -1143,6 +1143,9 @@ class Namespace:
self.world = world
self.prefix = prefix
+ def __add__(self, suffix):
+ return self.world.new_uri(self.prefix + suffix)
+
def __eq__(self, other):
return str(self) == str(other)
diff --git a/bindings/test/python/test_api.py b/bindings/test/python/test_api.py
index 62ab6c2..8d3a94a 100644
--- a/bindings/test/python/test_api.py
+++ b/bindings/test/python/test_api.py
@@ -391,6 +391,9 @@ class QueryTests(unittest.TestCase):
self.assertEqual(
self.world.ns.lv2.Plugin, "http://lv2plug.in/ns/lv2core#Plugin"
)
+ self.assertEqual(
+ self.world.ns.lv2 + "Plugin", "http://lv2plug.in/ns/lv2core#Plugin"
+ )
def testQuery(self):
self.assertTrue(