The complexity of a type dictates which of three strategies you will use to initialize your immutable type.
一个类型的复杂性指示了你应该使用这三个策略里面的哪一个来初始化不可变类型。
It does not create an uninitialized string, since creating an empty instance of an immutable type serves no purpose.
它不会建立未初始化的字串,因为建立不变型别的空执行个体没有任何用处。
To create an immutable type, you need to ensure that there are no holes that would allow clients to change your internal state.
为了创建一个不可变的类型,你需要保障没有任何漏洞允许客户修改你的内部状态。
If the range variable is not an immutable type, the query will only ignore a query result if all members of the type match an existing query result.
如果范围变数并非不变的型别,则只有当型别的所有成员都符合现有的查询结果时,查询才会忽略查询结果。
Some repositories have immutable item classes that are set based on the item type, while others will allow a repository administrator or end user to define the classes that can be set on an item.
某些存储库具有不可改变的项目类,对其的设定是基于项目类型的;而其他的存储库则允许存储库管理员或终端用户对类进行定义,对其的设定是基于项目的。
The third article in this series, " Exploring the Python type hierarchy, Introducing Strings," introduces the Python string, which is also an immutable sequence, but only for character data.
本系列的第三篇文章探索Python类型的层次结构 —— 使用字符串介绍了 Pythonstring,这也是一个不可变的序列,但仅针对字符数据。
For example, the tuple type, while less flexible because it's immutable, is generally much faster than the list type when used in identical situations.
例如,tuple类型,尽管它是不可变的,灵活性较差,但在同一环境中使用时,它们通常比list类型快得多。
One common type of list is called a tuple, and as noted, it's immutable.
一种常用的列表类型是tuple,它是不可变的。
As discussed, the tuple type is an immutable heterogeneous container.
如文中所述,tuple类型是不可变的异构容器。
Unlike strings, which are immutable, lists are a mutable type, i. e. it is possible to change their content.
不像字符串是不可变量,列表是可变类型,例如:它可以改变它本身某个元素的值。
The values of a dictionary can be of any type, but the keys must be of an immutable data type such as strings, Numbers, or tuples.
字典的值可以是任何类型的,但必须是一个不可改变的数据类型,如字符串,数字,或元组键。
An abbreviation for the type of immutable singly-linked lists.
不可变单向链接列表的类型的缩写词。
An abbreviation for the type of immutable singly-linked lists.
不可变单向链接列表的类型的缩写词。
应用推荐