August'24: Kamaelia is in maintenance mode and will recieve periodic updates, about twice a year, primarily targeted around Python 3 and ecosystem compatibility. PRs are always welcome. Latest Release: 1.14.32 (2024/3/24)

Axon.Axon

Axon base classes

What is defined here is a metaclass that is used as a base class for some key classes in Axon.

It was originally created to allow super class calling in a slightly nicer manner in terms of syntactic sugar easier to get right that still has the good effects of "super" in a multiple inheritance scenario. Use of this particular feature has been deprecated because of more subtle issues in inheritance situations.

However this metaclass has been retained (and is still used) for possible future uses.

Test documentation

Tests passed:

  • AxonObject - derives from object, but sets a metaclass of AxonType - to allow superclass method calling simply. ttbChecked
  • AxonType.__init__ - adds an extra __super method to all objects created from classes with this metaclass simplifying superclass method calling. ttbChecked

Axon.Axon.AxonObject

class AxonObject(object)

Base class for axon objects.

Uses AxonType as its metaclass.

Axon.Axon.AxonType

class AxonType(type)

Metaclass for Axon objects.

Methods defined here

__init__(cls, name, bases, dict)

Override creation of class to set a 'super' attribute to what you get when you call super().

Note that this 'super' attribute is deprecated - there are some subtle issues with it and it should therefore be avoided.

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, 09 Dec 2009 at 04:00:25 UTC/GMT