Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 2f465c7af448b596f18821b95c37334d > files > 267

python-Traits-4.3.0-1.fc18.i686.rpm

Documentation Examples
======================

This tutorial is simply a collection of the various examples taken from the
Traits documentation. They are presented as a tutorial so that interested users
can see the results of actually executing the example code, as well as to 
promote further study and exploration of various Traits topics in an interactive
environment that allows easy modification and testing of changes to the code.

So please feel free to explore the examples as your time, fancy and interest 
dictate. Have fun!

A brief description of each of the examples presented in this tutorial follows:

Add Class Traits
    Defining mutually-referring classes using the *add_class_trait* method.
    
All Traits Features
    Shows the five primary features of the Traits package.
        
Bad Self Ref
    Shows the incorrect way of defining a self-referencing class.
    
Cast Simple
    Shows use of some of the simple casting types.
    
Circular Definition
    Shows the incorrect way of defining mutually-referring classes.
    
Compound
    Shows the definition of a compound trait.

Custom TraitHandler
    Example of a custom TraitHandler

Use Custom TraitHandler
    Example of using a custom TraitHandler
    
Delegate
    Example of trait delegation.
    
Delegate Prefix
    Examples of the Delegate() 'prefix' parameter.
    
Delegation Notification
    Example of notification with delegation.
    
Event
    Shows the definition of a trait event
    
List Notifiers
    Example of zero-parameter handlers for an object containing a list
    
Metadata
    Example of accessing trait metadata attributes
    
Minimal
    Minimal example of using Traits.
    
Override Default
    Example of overriding a default value for a trait attribute in a subclass
    
Static Notification
    Example of static attribute notification
    
This
    Example of This predefined trait

Trait Reuse
    Example of reusing trait definitions
    
Temp Wildcard
    Example of using a wildcard with a trait attribute name.
All Wildcard
    Shows the trait attribute wildcard rules.
Wildcard rules
    Example of trait attribute wildcard rules