[Checkins] SVN: grokcore.component/trunk/src/grokcore/component/
Removed utility function that's not used in grokcore.component,
but solely in grok (it has been added back there).
Philipp von Weitershausen
philikon at philikon.de
Fri May 2 18:27:44 EDT 2008
Log message for revision 86145:
Removed utility function that's not used in grokcore.component, but solely in grok (it has been added back there).
Changed:
D grokcore.component/trunk/src/grokcore/component/tests/util/public_methods_from_class.py
U grokcore.component/trunk/src/grokcore/component/util.py
-=-
Deleted: grokcore.component/trunk/src/grokcore/component/tests/util/public_methods_from_class.py
===================================================================
--- grokcore.component/trunk/src/grokcore/component/tests/util/public_methods_from_class.py 2008-05-02 22:26:25 UTC (rev 86144)
+++ grokcore.component/trunk/src/grokcore/component/tests/util/public_methods_from_class.py 2008-05-02 22:27:44 UTC (rev 86145)
@@ -1,27 +0,0 @@
-"""
- >>> methods = util.public_methods_from_class(A)
- >>> sorted([m.__name__ for m in methods])
- ['should_also_be_public', 'should_be_public']
-
-"""
-import grokcore.component.util as util
-
-class A(object):
-
- def __init__(self):
- pass # this method is ignored
-
- def __call__(self):
- pass # this method is ignored
-
- def __double_underscored(self):
- pass # this method is ignored
-
- def _single_underscored(self):
- pass # this method is ignored
-
- def should_be_public(self):
- pass # this method is found
-
- def should_also_be_public(self):
- pass # this method is found
Modified: grokcore.component/trunk/src/grokcore/component/util.py
===================================================================
--- grokcore.component/trunk/src/grokcore/component/util.py 2008-05-02 22:26:25 UTC (rev 86144)
+++ grokcore.component/trunk/src/grokcore/component/util.py 2008-05-02 22:27:44 UTC (rev 86145)
@@ -34,10 +34,6 @@
return directive
return default
-def public_methods_from_class(factory):
- return [m for m in methods_from_class(factory) if \
- not m.__name__.startswith('_')]
-
def _sort_key(component):
explicit_order, implicit_order = class_annotation(component,
'grok.order',
More information about the Checkins
mailing list