what is tuple

1)在 LISP、Python、 Linda以及其他一些编程语言中,元组是一个有序数值的集合,每个数值通常以逗号隔开,元组通常作为一个数据类型来:(1)在程序之间传递一串参数 ;(2)在关系数据库中代表一个数值属性的集合。在有些语言中,元组之间可以嵌套,他们用小括号或这种括号或者其他分隔符分来。元组的元素可以是不同的数 据类型。

  以下是一个元组的例子,它强调一个元组的元素刻意属于不同的数据类型: 

  17,*,2.49,Seven

  上面这个例子有时候被称作四元组,因为它有四个元素。n元组的元素数量是不确定的。

2)元组类似于非关系数据库中的记录。
术语来源于:single(1) -> double
(2) -> triple(3) ->quadruple(4)->quintuple(5)-> n-tuple(n)
在数学理论中,tuple用来指多维坐标系。

原文:http://whatis.techtarget.com/

tuple

1) In programming languages, such as
LISP, Python, Linda, and others, a tuple (pronounced TUH-pul) is an ordered set of values. The separator for each value is often a comma (depending on the rules of the particular language). Common uses for the tuple as a data type are (1) for passing a string of parameters from one program to another, and (2) representing a set of value attributes in a relational database. In some languages, tuples can be nested within other tuples within parentheses or brackets or other delimiters. Tuples can contain a mixture of other data types.

Here's an example of a tuple that emphasizes the different data types that may exist within a tuple data type:

17,*,2.49,Seven
The above example is sometimes referred to as a 4-tuple, since it contains four values. An n-tuple would be one with an indeterminate or unspecified number of values.

2) A tuple is analogous to a record in nonrelational databases.

The term originated as an abstraction of the sequence: single, double, triple, quadruple, quintuple, ... n-tuple. Tuple is used in abstract mathematics to denote a multidimensional coordinate system.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值