[Checkins]
SVN: grokcore.component/branches/jw-philipp-using-ndir-directives/src/grokcore/component/directive.py
Fix the order directive.
Jan-Wijbrand Kolman
janwijbrand at gmail.com
Sat May 3 05:02:11 EDT 2008
Log message for revision 86154:
Fix the order directive.
Changed:
U grokcore.component/branches/jw-philipp-using-ndir-directives/src/grokcore/component/directive.py
-=-
Modified: grokcore.component/branches/jw-philipp-using-ndir-directives/src/grokcore/component/directive.py
===================================================================
--- grokcore.component/branches/jw-philipp-using-ndir-directives/src/grokcore/component/directive.py 2008-05-03 08:39:03 UTC (rev 86153)
+++ grokcore.component/branches/jw-philipp-using-ndir-directives/src/grokcore/component/directive.py 2008-05-03 09:02:10 UTC (rev 86154)
@@ -49,18 +49,14 @@
class order(ndir.Directive):
scope = ndir.CLASS
store = ndir.ONCE
+ default = 0, 0
_order = 0
- def factory(self, value=None):
+ def factory(self, value=0):
order._order += 1
- if value is not None:
- return value, order._order
- return super(order, self).factory(value)
+ return value, order._order
- def default_value(self, component):
- return 0, self._order
-
class name(ndir.Directive):
scope = ndir.CLASS
store = ndir.ONCE
More information about the Checkins
mailing list