adaptivemd.Bundle

class adaptivemd.Bundle(iterable=None)[source]

A container of objects

__init__(iterable=None)[source]

Methods

__init__([iterable])
add(item) Add a single item to the bundle
c(cls) Return a view bundle on all entries that are instances of a class
f(pattern) Return a view bundle on all entries that match a location pattern
pick() Pick a random element
sorted(key) Return a view bundle where all entries are sorted by a given key attribute
update(iterable) Add multiple items to the bundle at once
v(fnc) Return a view bundle on all entries that are filtered by a function

Attributes

all Return a Delegator that will apply attribute and function call to all bundle elements
one Return one element from the list
update(iterable)[source]

Add multiple items to the bundle at once

Parameters:iterable (Iterable) – the items to be added
add(item)[source]

Add a single item to the bundle

Parameters:item (object) –