From d0954117899d73fcca82f66a933974d9c39966fd Mon Sep 17 00:00:00 2001 From: André Erdmann Date: Fri, 23 Aug 2013 15:37:22 +0200 Subject: roverlay/util/namespace: add default values for args, kwargs to get_object_v() --- roverlay/util/namespace.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'roverlay/util') diff --git a/roverlay/util/namespace.py b/roverlay/util/namespace.py index 86d102f..5dce92e 100644 --- a/roverlay/util/namespace.py +++ b/roverlay/util/namespace.py @@ -52,7 +52,7 @@ class AbstractNamespace ( object ): # --- end of get_dict_hash (...) --- @roverlay.util.objects.abstractmethod - def get_object_v ( self, cls, args, kwargs ): + def get_object_v ( self, cls, args=(), kwargs={} ): """Returns the desired object. The object will be created if it does not already exist in the @@ -83,7 +83,7 @@ class NullNamespace ( AbstractNamespace ): pass # --- end of zap (...) --- - def get_object_v ( self, cls, args, kwargs ): + def get_object_v ( self, cls, args=(), kwargs={} ): return cls ( *args, **kwargs ) # --- end of get_object_v (...) --- @@ -111,7 +111,7 @@ class SimpleNamespace ( AbstractNamespace ): self._objects = dict() # --- end of __init__ (...) --- - def get_object_v ( self, cls, args, kwargs ): + def get_object_v ( self, cls, args=(), kwargs={} ): ident = ( hash ( args ) if args else 0, self.get_dict_hash ( kwargs ) if kwargs else 0, -- cgit v1.2.3-65-gdbad