[Checkins] SVN: martian/branches/jw-philipp-using-ndir-directives/src/martian/util.py Remove superfluous helpers

Philipp von Weitershausen philikon at philikon.de
Sun May 4 09:22:11 EDT 2008


Log message for revision 86366:
  Remove superfluous helpers

Changed:
  U   martian/branches/jw-philipp-using-ndir-directives/src/martian/util.py

-=-
Modified: martian/branches/jw-philipp-using-ndir-directives/src/martian/util.py
===================================================================
--- martian/branches/jw-philipp-using-ndir-directives/src/martian/util.py	2008-05-04 13:13:29 UTC (rev 86365)
+++ martian/branches/jw-philipp-using-ndir-directives/src/martian/util.py	2008-05-04 13:22:11 UTC (rev 86366)
@@ -51,27 +51,6 @@
 def is_baseclass(name, component):
     return (isclass(component) and martian.baseclass.get(component))
 
-def class_annotation(obj, name, default):
-    return getattr(obj, '__%s__' % name.replace('.', '_'), default)
-
-def class_annotation_list(obj, name, default):
-    """This will process annotations that are lists correctly in the face of
-    inheritance.
-    """
-    if class_annotation(obj, name, default) is default:
-        return default
-
-    result = []
-    for base in reversed(obj.mro()):
-        list = class_annotation(base, name, [])
-        if list not in result:
-            result.append(list)
-
-    result_flattened = []
-    for entry in result:
-        result_flattened.extend(entry)
-    return result_flattened
-
 def defined_locally(obj, dotted_name):
     obj_module = getattr(obj, '__grok_module__', None)
     if obj_module is None:



More information about the Checkins mailing list