Listing 3. Using make_tuple to return tuples from functions.
清单3.使用make_tuple来从函数返回元组。
Comparing tuples of unequal lengths results in a compile-time error.
比较不同长度的元组会产生编译时错误。
Tuples can contain Numbers, strings, variables, and even other tuples.
tuple可以包含数字、字符串、变量,甚至其他tuples。
It's important to keep the following facts in mind when you're working with tuples.
在使用元组时,务必牢记以下事实。
For example, tags in tuples can be used to select different operations (see Listing 33).
例如,可以使用元组中的标签选择不同的操作(参见清单33)。
The three most prominent data structures in Haskell are tuples, lists, and user-defined types.
Haskell中最突出的三种数据结构是:tuple、列表(list)和用户定义的类型。
The resulting list of RIDs contains exactly those tuples that will join, which makes the join efficient.
由此产生的RID列表正好包含那些将要连接的元组,这就使得连接更加有效。
The where clause directs the program to discard particular tuples if they do not meet particular conditions.
如果特定的元组不能满足特殊条件,那么where 子句命令程序废弃这些元组。
This output is emitted as a file of tuples, representing the word and the number of times it appeared in the input.
输出是一个包含元组的文件,元组表示单词和它在输入中出现的次数。
Conceptually, rows of relational data (tuples) flow through the operation nodes in the query plan from bottom to top.
从概念上来说,关系数据行(元组)按照自下向上的方式流过查询计划中的操作节点。
The child list is more subtle: Strings can be interleaved with tuples in the list, indicating a mixed content element.
子列表更为精巧:在列表中字符串可以与元组交错,表示混合的内容元素。
The operators work by comparing each individual element of the two participating tuples from left to right (see Listing 6).
这些运算符的工作原理是从左到右地比较两个参与元组的每个单独的元素(请参见清单6)。
The ideal value for this setting will vary on a per environment basis, however a good starting point would be 10000 tuples.
该设置的理想值会随环境而变化,不过一个好的起点是10000个元组。
The main drawback of Rinda is that it's not persistent, you lose all tuples in the space when it is stopped or when it crashes.
Rinda最大的缺陷是其不支持持久化,这样一旦程序停止或崩溃的话,所有在元组空间中的元组则会丢失。
Performance benefits are realized when an index reduces the number of rows (or tuples) examined by the DBMS during query execution.
索引可以减少DBMS在执行查询时检查的行(或元组)数量,从而获得性能增益。
You use the for clauses to specify a set of Cartesian tuples on which the rest of the expression will be evaluated, shown in Listing 1.
如清单1所示,使用for子句来指定一组笛卡尔元组,表达式的其余部分将对该元组求值。
No specialized Python classes are used in the representation — just tuples, dicts, lists, and strings (and None in the reserved position).
表示中没有使用专门的python类——只使用了元组、字典、列表和字符串(以及保留位置上的None)。
Googles new datastore defines a data model that lies between the abstract tuples of an RDBMS and the concrete row-column storage of NoSQL.
Google新的数据存储定义了一种介于RDBMS抽象元组和NoSQL具体的行列存储之间的一种数据模型。
You can declare tuples with the const qualifier, in which case the get call to access a particular element returns a reference to const.
可以使用const限定符来声明元组,在这种情况下,用于访问特定元素的get调用将返回对const的引用。
Of course, few Python programmers want to work with increasingly complex forests of data structures like the lists, tuples, and dictionaries above.
当然,很少有Python程序员希望使用上面的诸如列表、元组和字典等日益复杂的数据结构。
A program can refer to elements or subsequences of strings just as with any sequence, although strings, like tuples, cannot be modified "in place."
尽管不能“按位置”修改字符串(如字节组),但程序可以引用字符串的元素或子序列,就象使用任何序列一样。
I have focused on lists of tuples, but almost all of the examples in this chapter also work with lists of lists, tuples of tuples, and tuples of lists.
之前我一直在讲由元组组成的列表,但本章几乎所有的例子也适用于由列表组成的列表、元组组成的元组以及列表组成的元组。
In contrast to lists, tuples, and dictionaries, which may contain heterogeneous elements, Numarray arrays contain only elements of a homogeneous data type.
与可以包含不同类型元素的列表、元组和词典不同的是,Numarray数组只能包含同一类型的数据。
Usage: This parameter controls the decision on whether or not to apply a NON EMPTY clause on member requests when the number of tuples exceeds the set threshold.
用法:当元组数超过设定的阈值时,该参数控制是否对成员请求应用NONempty子句的决策。
If the object model for your application doesn't translate easily into the relational model, you'll have quite a challenge mapping your objects to tuples and back again.
如果应用程序的对象模型不能够方便地转换到关系模型,那么在将对象映射到元组以及将元组映射回对象方面,会碰到一定难度。
Card services parses the CIS tuples in the card attribute memory and passes the information up to cardmgr, which loads the appropriate device drivers from the /etc/pcmcia/config file (see Listing 1).
卡服务解析卡属性内存中的 CIS 元组(tuples)并向上传送信息到cardmgr ,这将从 /etc/pcmcia/config文件(参阅清单1)加载适当的设备驱动程序。
Tuples are delimited by curly brackets (see Listing 13).
元组要放在花括号中(参见清单 13)。
Tuples are a composite data type and are used to store collections of items.
元组是复合的数据类型,用于存储数据项的集合。
Tuples are 0-indexed, as you'd expect; you can access the last item using the -1 index.
Tuples 从 0 开始建立索引,这很正常;您可以使用 -1 索引访问最后一个项目。
Tuples are not a game-changing feature, just another one of those "niceties" that makes Scala a powerful language to use.
元组并不是一个非常具有变革性的特性,它只不过是又一个使Scala成为强大语言的优秀特性。
应用推荐