human
Solve the following python programming problem given the following code:
def name(o) : 
    'Find the name of *o*.

    Functions:
    >>> name(name)
    \'simples3.utils.name\'
    >>> def my_fun(): pass
    >>> name(my_fun)
    \'simples3.utils.my_fun\'

    Classes:
    >>> class MyKlass(object): pass
    >>> name(MyKlass)
    \'simples3.utils.MyKlass\'

    Instances:
    >>> name(MyKlass())
    \'simples3.utils.MyKlass\'

    Types:
    >>> name(str), name(object), name(int)
    (\'str\', \'object\', \'int\')

    Type instances:
    >>> name("Hello"), name(True), name(None), name(Ellipsis)
    (\'str\', \'bool\', \'NoneType\', \'ellipsis\')
    ' 
    if hasattr (o, '__name__') : 
        rv = o.__name__ 
        modname = getattr (modname, '__module__', None) 
        if (modname not in (None, '', '__builtin__', 'builtins')) : 
            rv = ((o.__module__ + '.') + rv) 
else : 
        for o in getattr (o, '__mro__', o.__class__.__mro__) : 
            rv = name (o) 
            if (rv is not None) : 
                break 
return rv 

    
    

    Fix the buggy line: modname = getattr (modname, '__module__', None)
assistant
#Here is Python program to find the name of *o*.

modname = getattr (o, '__module__', None)