Skip to content

Instantly share code, notes, and snippets.

@jbest84
Last active February 14, 2017 23:19
Show Gist options
  • Save jbest84/cda4aa0321c264fe9206b8699ed1db7d to your computer and use it in GitHub Desktop.
Save jbest84/cda4aa0321c264fe9206b8699ed1db7d to your computer and use it in GitHub Desktop.
Argos View Module Resolution Order
https://www.python.org/download/releases/2.3/mro/
* Take the head of the first list, i.e L[B1][0]
* if this head is not in the tail of any of the other lists
- then add it to the linearization of C and remove it from the lists in the merge
- otherwise look at the head of the next list and take it
* if it is a good head. Then repeat the operation until all the class are removed or it is impossible to find good heads
// W = _WidgetBase
// S = Stateful
// D = Destroyable
// V = View
// A = _ActionMixin
// C = _CustomizationMixin
// T = _Templated
// E = _ErrorHandleMixin
// O = Object/null
// M = _TemplatedMixin
// H = _AttachMixin
// Stateful
L[S] = SO
// Destroyable
L[D] = DO
//_WidgetBase
L[W] = W + merge(SO, DO, SD)
L[W] = WSDO
//_ActionMixin
L[A] = AO
//_CustomizationMixin
L[C] = CO
//_AttachMixin
L[H] = HO
// _TemplatedMixin
L[M] = M + merge(HO, H)
L[M] = MHO
//_Templated
L[T] = T + merge(MHO, M)
L[T] = TMHO
//_ErrorHandleMixin
L[E] = EO
// View - [_WidgetBase, _ActionMixin, _CustomizationMixin, _Templated, _ErrorHandleMixin]
L[V] = V + merge(WSDO, AO, CO, TMHO, EO)
L[V] = V + W + merge(SDO, AO, CO, TMHO, EO)
L[V] = V + W + S + merge(DO, AO, CO, TMHO, EO)
L[V] = V + W + S + D + merge(O, AO, CO, TMHO, EO)
L[V] = V + W + S + D + A + merge(O, O, CO, TMHO, EO)
L[V] = V + W + S + D + A + C + merge(O, O, O, TMHO, EO)
L[V] = V + W + S + D + A + C + T + merge(O, O, O, MHO, EO)
L[V] = V + W + S + D + A + C + T + M + merge(O, O, O, HO, EO)
L[V] = V + W + S + D + A + C + T + M + H + merge(O, O, O, O, EO)
L[V] = V + W + S + D + A + C + T + M + H + E + merge(O, O, O, O, O)
L[V] = V + W + S + D + A + C + T + M + H + E + O
L[V] = View, [_WidgetBase, Stateful, Destroyable], _ActionMixin, _CustomizationMixin, [_Templated, _TemplatedMixin, _AttachMixin], _ErrorHandleMixin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment