2016-05-04 32 views
0

当我读了Python源代码,我发现内置的功能,如python内置函数原理?

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 

我的问题是什么呢空的方法?为什么写在这里?

+0

请编辑您的文章并添加更多详情,这是哪个库/模块?提到这个名字。 – direprobs

回答

0

一些(可能大部分)Python的内置函数都是用C语言编写的,所以他们没有Python实现。