Package gofer :: Package agent :: Module deplist :: Class DepList
[hide private]
[frames] | no frames]

Class DepList

source code

Dependency solving list. Items are tuples: (object, (deps,))

Instance Methods [hide private]
 
__init__(self) source code
DepList
add(self, *items)
Add items to be sorted.
source code
list
sort(self)
Sort the list based on dependencies.
source code
(item, iter)
top(self)
Get the item at the top of the stack.
source code
int
push(self, item)
Push and item onto the sorting stack.
source code
item
pop(self)
Pop the top item off the stack and append it to the sorted list.
source code
Instance Variables [hide private]
list index
The index of (unsorted) items.
set pushed
The pushed set tracks items that have been processed.
list sorted
The sorted list of items.
list stack
The sorting stack.
list unsorted
The raw (unsorted) items.
Method Details [hide private]

add(self, *items)

source code 

Add items to be sorted.

Parameters:
  • items (item) - One or more items to be added.
Returns: DepList
self

sort(self)

source code 

Sort the list based on dependencies.

Returns: list
The sorted items.

top(self)

source code 

Get the item at the top of the stack.

Returns: (item, iter)
The top item.

push(self, item)

source code 

Push and item onto the sorting stack.

Parameters:
  • item (item) - An item to push.
Returns: int
The number of items pushed.

pop(self)

source code 

Pop the top item off the stack and append it to the sorted list.

Returns: item
The popped item.