Python中的“命名元组”是什么? - What are “named tuples” in Python?
2021-05-05 10:28
标签:change should any 问题: before 阅读 ons 字典 and Reading the changes in Python 3.1 , I found something... unexpected: 阅读Python 3.1中的更改后 ,我发现了一些意外…… The sys.version_info tuple is now a named tuple : sys.version_info元组现在是一个命名的元组 : I never heard about named tuples before, and I thought elements could either be indexed by numbers (like in tuples and lists) or by keys (like in dicts). 我以前从未听说过命名元组,并且我认为元素可以通过数字(例如在元组和列表中)或通过键(例如在字典中)进行索引。 I never expected they could be indexed both ways. 我从未想到它们可以同时被索引。 Thus, my questions are: 因此,我的问题是: 参考一: https://stackoom.com/question/CSn2/Python中的-命名元组-是什么 推荐:https://www.xmtpost.com/1251.html Python中的“命名元组”是什么? - What are “named tuples” in Python? 标签:change should any 问题: before 阅读 ons 字典 and 原文地址:https://www.cnblogs.com/1994july/p/13192724.html问题:
解决方案:
参考二: https://oldbug.net/q/CSn2/What-are-named-tuples-in-Python
文章标题:Python中的“命名元组”是什么? - What are “named tuples” in Python?
文章链接:http://soscw.com/index.php/essay/82693.html