CallbackList

class glue.external.echo.CallbackList(callback, *args, **kwargs)[source]

Bases: list

A list that calls a callback function when it is modified.

The first argument should be the callback function (which takes no arguments), and subsequent arguments are as for list.

Methods Summary

append(self, value)

clear(self)

extend(self, iterable)

insert(self, index, value)

L.insert(index, object) – insert object before index

pop(self[, index])

Raises IndexError if list is empty or index is out of range.

remove(self, value)

Raises ValueError if the value is not present.

reverse(self)

L.reverse() – reverse IN PLACE

sort(self[, key, reverse])

Methods Documentation

append(self, value)[source]
clear(self)[source]
extend(self, iterable)[source]
insert(self, index, value)[source]

L.insert(index, object) – insert object before index

pop(self, index=-1)[source]

Raises IndexError if list is empty or index is out of range.

remove(self, value)[source]

Raises ValueError if the value is not present.

reverse(self)[source]

L.reverse() – reverse IN PLACE

sort(self, key=None, reverse=False)[source]