/usr/share/pyshared/grokcore/component/tests/order/noarg_orderdirective.py is in python-grokcore.component 2.5-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | """
If the grok.order directive is present with no arguments, sorting will
be done by definition order.
>>> components = [First(), Second(), Third(), Fourth(), Fifth()]
>>> from grokcore.component import sort_components
>>> sort_components(components)
[<...First object at ...>,
<...Second object at ...>,
<...Third object at ...>,
<...Fourth object at ...>,
<...Fifth object at ...>]
"""
import grokcore.component as grok
class First(object):
grok.order()
class Second(object):
grok.order()
class Third(object):
grok.order()
class Fourth(object):
grok.order()
class Fifth(object):
grok.order()
|