(name, id=None)
return None
Return a matching behavior if it exists, or None.

    If id is None, return the default for name.
Return a matching behavior if it exists, or None.
Return a matching behavior if it exists or None .
def getBehavior(name, id=None):
    """
    Return a matching behavior if it exists, or None.

    If id is None, return the default for name.
    """
    name=name.upper()
    if name in __behaviorRegistry:
        if id:
            for n, behavior in __behaviorRegistry[name]:
                if n==id:
                    return behavior

        return __behaviorRegistry[name][0][1]
    return None
def getBehavior ( name , id = None ) : name = name . upper ( ) if name in __behaviorRegistry : if id : for n , behavior in __behaviorRegistry [ name ] : if n == id : return behavior return __behaviorRegistry [ name ] [ 0 ] [ 1 ] return None