Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 581a2dffc64bef35e96957a65359cde2 > files > 909

python-TraitsGUI-3.4.0-2.fc13.noarch.rpm

""" A simple example of some object model. """


# Enthought library imports.
from enthought.traits.api import HasTraits, Int, Str


class Person(HasTraits):
    """ A simple example of some object model! """

    # Age in years.
    age = Int
    
    # Name.
    name = Str

    ###########################################################################
    # 'object' interface.
    ###########################################################################

    def __str__(self):
        """ Return an informal string representation of the object. """

        return self.name

#### EOF ######################################################################