mercurial/demandload.py
changeset 2310 d01eac5968c6
parent 1826 f3abe0bdccdd
child 2807 a8a7ce1a01a5
--- a/mercurial/demandload.py	Thu May 18 13:48:12 2006 -0700
+++ b/mercurial/demandload.py	Thu May 18 13:52:55 2006 -0700
@@ -81,6 +81,10 @@
 
         return getattr(importer.module(), target)
 
+    def __call__(self, *args, **kwargs):
+        target = object.__getattribute__(self, 'module')()
+        return target(*args, **kwargs)
+
 def demandload(scope, modules):
     '''import modules into scope when each is first used.