API Reference for Enthought Tool Suite 2.7.1
Used for defining "category" extensions to existing classes.
To define a class as a category, specify "Category," followed by the name of the base class name in the base class list.
The following example demonstrates defining a category:
from enthought.traits.api import HasTraits, Str, Category
class Base(HasTraits):
x = Str("Base x")
y = Str("Base y")
class BaseExtra(Category, Base):
z = Str("BaseExtra z")
Copyright © 2002-2008 Enthought, Inc.