(behavior, name=None, default=False, id=None)
Register the given behavior.

    If default is True (or if this is the first version registered with this
    name), the version will be the default if no id is given.
Register the given behavior.
Register the given behavior .
def registerBehavior(behavior, name=None, default=False, id=None):
    """
    Register the given behavior.

    If default is True (or if this is the first version registered with this
    name), the version will be the default if no id is given.
    """
    if not name:
        name=behavior.name.upper()
    if id is None:
        id=behavior.versionString
    if name in __behaviorRegistry:
        if default:
            __behaviorRegistry[name].insert(0, (id, behavior))
        else:
            __behaviorRegistry[name].append((id, behavior))
    else:
        __behaviorRegistry[name]=[(id, behavior)]
def registerBehavior ( behavior , name = None , default = False , id = None ) : if not name : name = behavior . name . upper ( ) if id is None : id = behavior . versionString if name in __behaviorRegistry : if default : __behaviorRegistry [ name ] . insert ( 0 , ( id , behavior ) ) else : __behaviorRegistry [ name ] . append ( ( id , behavior ) ) else : __behaviorRegistry [ name ] = [ ( id , behavior ) ]