0

when i read the python source code i found the built-in functions like

class staticmethod(object):
    """
    ....
    """
    def __getattribute__(self, name): # real signature unknown; restored from __doc__
        """ x.__getattribute__('name') <==> x.name """
        pass

    def __get__(self, obj, type=None): # real signature unknown; restored from __doc__
        """ descr.__get__(obj[, type]) -> value """
        pass

    def __init__(self, function): # real signature unknown; restored from __doc__
        pass

    @staticmethod # known case of __new__
    def __new__(S, *more): # real signature unknown; restored from __doc__
        """ T.__new__(S, ...) -> a new object with type S, a subtype of T """
        pass

    __func__ = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default

my question is what does the empty method for ? why write it here?

  • Please edit your post and add more details, which library/module is this? Mention the name. – GIZ May 04 '16 at 11:22

1 Answers1

1

Some (maybe most) of Python's built-in functions are written in C, so there isn't a Python implementation for them.

DeepSpace
  • 78,697
  • 11
  • 109
  • 154