本文整理匯總了Python中pypy.annotation.model.SomeObject.from_ellipsis方法的典型用法代碼示例。如果您正苦於以下問題:Python SomeObject.from_ellipsis方法的具體用法?Python SomeObject.from_ellipsis怎麽用?Python SomeObject.from_ellipsis使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pypy.annotation.model.SomeObject
的用法示例。
在下文中一共展示了SomeObject.from_ellipsis方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: newtuple
# 需要導入模塊: from pypy.annotation.model import SomeObject [as 別名]
# 或者: from pypy.annotation.model.SomeObject import from_ellipsis [as 別名]
def newtuple(self, items_s):
if len(items_s) == 1 and items_s[0] is Ellipsis:
res = SomeObject() # hack to get a SomeObject as the *arg
res.from_ellipsis = True
return res
else:
return SomeTuple(items_s)
示例2: newtuple
# 需要導入模塊: from pypy.annotation.model import SomeObject [as 別名]
# 或者: from pypy.annotation.model.SomeObject import from_ellipsis [as 別名]
def newtuple(self, items_s):
if items_s == [Ellipsis]:
res = SomeObject() # hack to get a SomeObject as the *arg
res.from_ellipsis = True
return res
else:
return SomeTuple(items_s)