A tuple, however, is immutable.
然而,tuple是不可变的。
Listing 2. The for loop and a tuple.
清单2.for循环和tuple。
In particular, I'm going to return a tuple.
特别要注意,我要返回一个数组。
The identifier is a tuple of the form {name, version}.
该标识符是形如 {名称, 版本}的元组。
A is initialized with a tuple containing a and a _paras list.
用包含和_ paras列表的元组进行了初始化。
This sample code shows how to create a tuple in several ways.
该示例代码显示了如何以多种方式创建tuple。
To return a tuple from a function, you must invoke make_tuple.
要从函数返回元组,您必须调用make_tuple。
This query returns a result list each element of which is a Tuple.
这个查询返回一个结果列表,它的每个元素都是一个Tuple。
To access individual elements of a tuple, you use the get routine.
要访问元组的各个元素,您可以使用get例程。
Once you load a tuple with a series of values, you can't change it.
在tuple中载入一系列值之后,您不会更改它。
To use a tuple properly, you need to be familiar with how it works.
要正确使用tuple,就需要熟悉它的工作方式。
Each row of this table is a tuple consisting of the group name and user ID.
这个表中的每一行是一个由组名和用户ID组成的二元组。
Listing 1 USES a tuple of int, char, and float and prints the contents.
清单1使用int、char和float的元组并打印内容。
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,它是不可变的。
The final tuple, tc, used the actual class constructor to create a tuple.
最后一个tupletc使用了一个实际的类构造函数来创建tuple。
As you add more elements, creating a tuple structure becomes increasingly difficult.
随着您添加更多的元素,创建元组结构将变得越来越困难。
This sets the maximum potential size of a tuple which we will store in the cache.
这设置了将要存储在缓存中的元组的最大可能大小。
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)。
It's possible to create a tuple with temporary elements; the output from Listing 3 is (4 0).
可以创建具有临时元素的元组;清单3的输出为(40)。
Listing 2 demonstrates how to use a for loop to iterate through the elements of a tuple.
清单2演示了如何使用for循环迭代tuple的元素。
You also can create a tuple from a set of existing variables in a process called packing.
您还可以从称为打包的过程的一组现有变量中创建一个tuple。
It is going to give me back a tuple a collection of two things, and so check out the syntax.
它将给我返回一个数组或者系列的一对值,然后检查一下语法。
See how easy it is to create a tuple that can hold all kinds of items, including another tuple?
您会看到,创建可以拥有各种类型数据项(其中包括另一tuple)的 tuple是多么方便。
This converts the allocation into a tuple matching the move_resize method of class gtk.gdk.Window.
这将allocation转换成与类class gtk . gdk . Window的move_resize方法匹配的元组。
Python also has a concept of mutability and immutability: a tuple, for example, is an immutable list.
Python同时使用可变性和不变性的概念:举例来说,tuple就是一个不可变的列表。
The function can also return a value (or, more formally, an object), including a Python container like a tuple.
函数还可返回值(更为正式的说法是:对象),包括像tuple这样的python容器。
Exempting the format string argument, all other arguments must be squeezed in with either a tuple or a dictionary.
除了格式化字符串参数,所有其他的参数都必须用一个元组(tuple)或是一个字典(dictionary)进行挤压。
This basically means that a tuple can hold different types of objects, but once it's created, it can't be changed.
这主要是说tuple可以存放不同类型的对象,但是它一旦创建,就无法更改。
应用推荐