April 2024 - This site, and Kamaelia are being updated. There is significant work needed, and PRs are welcome.

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