Kamaelia docs : Axon.util
General utility functions & common includes
Test documentation
Tests passed:
- Finality - dummy class deriving from Exception - used for implementing try...finally in a generator.
- axonRaise - behaviour depends on the value of production. If true it will simply return False. Otherwise it will throw an
- listSubset - returns true if the first list argument is a subset of the second list argument.
- logError - At the moment this function does nothing but can be rewritten to log ignored exception data. Equally the test does nothing.
- production - is a module value that turns off some exception to make the system tolerant of failure when running in production.
- removeAll - (xs:list,y) - removes all occurances of y from the list xs.
- safeList - always returns a list even if the arg for constructing the list would normally cause a typeerror.
- safeList - Like list it returns an empty list when called without an argument.
- safeList - returns an empty list if the argument would cause a TypeError if passed to list(). That is anything without an iterator method.
- In production mode failed tests will return false. Otherwise they will throw an exception that is likely to stop the system.
- testInterface - returns true for a _minimal match_ on the interface of the component.
class Finality(Exception)
Used for implementing try...finally... inside a generator.
Raises the supplied exception with the supplied arguments if
Axon.util.production is set to True.
Returns true if the requiredList is a subset of the suppliedList.
Currently does nothing but can be rewritten to log ignored errors if the
production value is true.
Very simplistic method of removing all occurances of y in list xs.
Returns the list version of arg, otherwise returns an empty list.
Look for a minimal match interface for the component.
The interface should be a tuple of lists, i.e. ([inboxes],[outboxes]).
Feedback
Got a problem with the documentation? Something unclear that could be clearer?
Want to help improve it? Constructive criticism is very welcome - especially if you can suggest a better rewording!
Please leave you feedback
here
in reply to the documentation thread in the Kamaelia blog.
-- Automatic documentation generator, 19 Oct 2008 at 14:28:09 UTC/GMT
This is a page from the Kamaelia website. You can find the original here: