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
评论列表
文章目录