A tuple, however, is immutable.
然而,tuple是不可变的。
Listing 2. The for loop and a tuple.
清单2.for循环和tuple。
New containers (tuple, array, unordered set, etc)
新的容器(tuple、array、unorderedset等)
Other validity classes should be listed in the tuple.
其它有效性类应该列在该元组中。
The return clause defines what to return for each tuple.
return子句定义每个元组要返回的内容。
The Python tutorial has a section on the tuple container type.
Python指南中有一部分讨论了元组容器类型。
Each tuple represents a pair of stock tickers and stock prices.
每个元组代表一对股票代码和股价。
What about all the integers used in our dict and tuple objects?
在我们的dict和tuple对象中用到的所有的整数是怎么处理的呢?
A child of Seq must add an _order tuple as a class attribute.
Seq的子类型必须添加一个_ order元组作为类属性。
The built-in len method tells you the number of items in the tuple.
内置的len方法告诉您tuple中数据项的数量。
That article demonstrated the tuple, which is an immutable sequence.
这篇文章演示了tuple,这是一个不可变的序列。
Demonstrate the creation of each part of the Monkeybars MVC tuple.
演示Monkeybarsmvc组每个部分的创建。
As discussed, the tuple type is an immutable heterogeneous container.
如文中所述,tuple类型是不可变的异构容器。
The number of elements that can form a tuple is currently limited to 10.
能够形成元组的元素数量目前仅限于10个。
One common type of list is called a tuple, and as noted, it's immutable.
一种常用的列表类型是tuple,它是不可变的。
I introduced the simplest of these objects — the tuple — in this article.
在本文中,我介绍了其中的最简单的对象——tuple。
Each row of this table is a tuple consisting of the group name and user ID.
这个表中的每一行是一个由组名和用户ID组成的二元组。
Each format sequence is matched with an element of the tuple, in order.
每个格式序列对应元组当中的一个元素,次序相同。
Listing 1 USES a tuple of int, char, and float and prints the contents.
清单1使用int、char和float的元组并打印内容。
This sets the maximum potential size of a tuple which we will store in the cache.
这设置了将要存储在缓存中的元组的最大可能大小。
We're matching on particular kinds of Person objects inside the enclosing tuple.
我们在闭合元组里匹配特定类型的Person对象。
As you add more elements, creating a tuple structure becomes increasingly difficult.
随着您添加更多的元素,创建元组结构将变得越来越困难。
The first method creates a tuple that contains the sequence of integers from 0 to 9.
第一种方法是创建一个包含从0到9整数序列的tuple。
This example first creates a tuple named t that holds the integers 0 to 9, inclusive.
本例首先创建了名为t 的tuple,存放整数0至 9(包含 9)。
Because we used a set, we have to use tuple as we can only use an immutable object.
由于使用了集合,因此必须使用元组(tuple),因为只能使用不可修改的对象。
In Listing 2, the program will evaluate the expression four times, once for each tuple.
在清单2中,程序将对表达式进行四次求值,每次对一个元组求值。
Listing 2 demonstrates how to use a for loop to iterate through the elements of a tuple.
清单2演示了如何使用for循环迭代tuple的元素。
The second for loop shown in Listing 2 also iterates over all elements in the tuple.
清单2中显示的第二个for循环也迭代tuple中的所有元素。
An assignment with a sequence on the right side and a tuple of variables on the left.
元组赋值:一种赋值语句,等号右侧用一个序列,左侧为一个变量构成的元组。
It's possible to create a tuple with temporary elements; the output from Listing 3 is (4 0).
可以创建具有临时元素的元组;清单3的输出为(40)。
应用推荐