def on_trait_change ( name, post_init = False, *names ):
    """ Marks the following method definition as being a handler for the
        extended trait change specified by *name(s)*.

        Refer to the documentation for the on_trait_change() method of
        the **HasTraits** class for information on the correct syntax for
        the *name(s)* argument.

        A handler defined using this decorator is normally effective
        immediately. However, if *post_init* is **True**, then the handler only
        become effective after all object constructor arguments have been
        processed. That is, trait values assigned as part of object construction
        will not cause the handler to be invoked.
    """
    def decorator ( function ):
        prefix = '<'
        if post_init:
            prefix = '>'

        function.on_trait_change = prefix + \
                                   (','.join( [ name ] + list( names ) ))

        return function

    return decorator