英文字典中文字典


英文字典中文字典51ZiDian.com



中文字典辞典   英文字典 a   b   c   d   e   f   g   h   i   j   k   l   m   n   o   p   q   r   s   t   u   v   w   x   y   z       







请输入英文单字,中文词皆可:

tuple    
元组

元组

tuple
有序n 元; n 重序元


tuple
n 倍; n 元组; n 元数; n 元向量


tuple
重元组

tuple


In {functional languages}, a data object containing two or
more components. Also known as a product type or pair,
triple, quad, etc. Tuples of different sizes have different
types, in contrast to lists where the type is independent of
the length. The components of a tuple may be of different
types whereas all elements of a list have the same type.
Examples of tuples in {Haskell} notation are (1,2),
("Tuple",True), (w,(x,y),z). The degenerate tuple with zero
components, written (), is known as the unit type since it has
only one possible value which is also written ().

The implementation of tuples in a language may be either
"{lifted}" or not. If tuples are lifted then (bottom,bottom)
/= bottom and the evaluation of a tuple may fail to terminate.
E.g. in Haskell:

f (x,y) = 1 --> f bottom = bottom
f (bottom,bottom) = 1

With lifted tuples, a tuple pattern is refutable. Thus in
Haskell, {pattern matching} on tuples is the same as pattern
matching on types with multiple constructors ({algebraic data
types}) - the expression being matched is evaluated as far as
the top level constructor, even though, in the case of tuples,
there is only one possible constructor for a given type.

If tuples are unlifted then (bottom, bottom) = bottom and
evaluation of a tuple will never fail to terminate though any
of the components may. E.g. in {Miranda}:

f (x,y) = 1 --> f bottom = 1
f (bottom,bottom) = 1

Thus in Miranda, any object whose type is compatible with a
tuple pattern is assumed to match at the top level without
evaluation - it is an {irrefutable} pattern. This also
applies to user defined data types with only one constructor.
In Haskell, patterns can be made irrefutable by adding a "~"
as in

f ~(x,y) = 1.

If tuple constructor functions were {strict} in all their
arguments then (bottom,x) = (x,bottom) = bottom for any x so
matching a refutable pattern would fail to terminate if any
component was bottom.


请选择你想看的字典辞典:
单词字典翻译
Tuple查看 Tuple 在百度字典中的解释百度英翻中〔查看〕
Tuple查看 Tuple 在Google字典中的解释Google英翻中〔查看〕
Tuple查看 Tuple 在Yahoo字典中的解释Yahoo英翻中〔查看〕





安装中文字典英文字典查询工具!


中文字典英文字典工具:
选择颜色:
输入中英文单字

































































英文字典中文字典相关资料:


  • 如何理解和使用tuple? - 知乎
    tuple一般在中文中称为元组,或者说n元组。就是由n个元素组成的一种有序数据结构(当然n是不小于零的整数)。不同的编程语言对元组有不同实现,但既然标签打的Python,那就只谈和Python中的元组有关的。 Python对元组有语法支持,直接括号里写上用逗号分隔的值即可构造一个元组:
  • python - What is a tuple useful for? - Stack Overflow
    A tuple is a good way to pack multiple values into that cookie without having to define a separate class to contain them I try to be judicious about this particular use, though
  • list - What exactly are tuples in Python? - Stack Overflow
    A tuple is a sequence of immutable Python objects Tuples are sequences, just like lists The differences between tuples and lists are, the tuples cannot be changed unlike lists and tuples use parentheses, whereas lists use square brackets Creating a tuple is as simple as putting different comma-separated values
  • types - What are named tuples in Python? - Stack Overflow
    Named tuples are basically easy-to-create, lightweight object types Named tuple instances can be referenced using object-like variable dereferencing or the standard tuple syntax They can be used similarly to struct or other common record types, except that they are immutable They were added in Python 2 6 and Python 3 0, although there is a recipe for implementation in Python 2 4 For
  • How does tuple comparison work in Python? - Stack Overflow
    Tuples are compared position by position: the first item of the first tuple is compared to the first item of the second tuple; if they are not equal (i e the first is greater or smaller than the second) then that's the result of the comparison, else the second item is considered, then the third and so on See Common Sequence Operations: Sequences of the same type also support comparisons In
  • Python typing: tuple [str] vs tuple [str, . . . ] - Stack Overflow
    Python typing: tuple [str] vs tuple [str, ] Ask Question Asked 3 years, 11 months ago Modified 3 years, 11 months ago
  • python中的tuple应该怎么读? - 知乎
    python中的tuple应该怎么读? 有道词典是这样说的: 英 ['tjuːp (ə)l] 美 ['tjup (ə)l] 百度是这样说的: [英]tʌpl [美]tʌpl 书上是这样说的: 发音… 显示全部 关注者 26
  • How to create tuple with a loop in python - Stack Overflow
    3 A tuple is an immutable list This means that, once you create a tuple, it cannot be modified Read more about tuples and other sequential data types here
  • c# - Tuple. Create () vs new Tuple - Stack Overflow
    new Tuple<int,int>(1,2); Tuple Create(1,2); Is there any difference between these two methods of Tuple creation? From my reading it seems to be more a convenient shorthand than anything like object creation in C++ (heap vs stack)





中文字典-英文字典  2005-2009