__init__.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:pytypes 作者: Stewori 项目源码 文件源码
def _GenericMeta__new__351(cls, *args, **kwds):
        origin = None
        if len(args) >= 6:
            # origin is at index 5 in original signature:
            # name, bases, namespace, tvars=None, args=None, origin=None, extra=None, orig_bases=None
            origin = args[5]
        elif 'origin' in kwds:
            origin = kwds['origin']
        res = _GenericMeta__new__(cls, *args, **kwds)
        # we correct the hash according to the fix in https://github.com/python/typing/pull/371
        res.__tree_hash__ = (hash(res._subs_tree()) if origin else
                super(typing.GenericMeta, res).__hash__())
        return res
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号