diff pyloader/factory.py @ 60:cc361ad8a692

stub out future directions for decorators and their testing a bit
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 09 Jun 2011 09:07:08 -0700
parents f724db086125
children 97800b02f636
line wrap: on
line diff
--- a/pyloader/factory.py	Thu Jun 09 08:17:08 2011 -0700
+++ b/pyloader/factory.py	Thu Jun 09 09:07:08 2011 -0700
@@ -128,13 +128,19 @@
                 # TODO: could interpolate wrapper 
                 if wrapper in names:
 
+                    # TODO: wrapper arguments:
+                    # [extended-fibonacci:@:four=4,five=5:fibonacci]
+
                     # TODO: will be correct for
                     # [foo:bar:%(here)s/objects.py:MyClass]
                     # but not for
                     # [foo:bar:fleem]
                     # in the latter case, just use fleem
                     # but check for cyclic consistency
-                    wrapped_name = section
+                    if _path in names:
+                        wrapped_name = _path
+                    else:
+                        wrapped_name = section
                     
                     if wrapper not in config:
                         wrapper_section = names[wrapper]
@@ -162,6 +168,8 @@
                     name = wrapped_name
                     path = _path
 
+                    
+
             # make a dict for the section
             path = path % defaults
             sect = config[name] = dict(path=path)