【问题标题】:Where in the official Python docs does it describe __add__ for list type?在 Python 官方文档中,它在哪里描述了列表类型的 __add__ ?
【发布时间】:2014-11-10 13:30:05
【问题描述】:

在 Python 3 和 Python 2 文档中,list 类型都没有引用 __add__

它既不存在于list type description 也不存在于special methods section

官方文档是否省略了+list 的实现描述?

【问题讨论】:

  • Common Sequence Operations。它不是专门针对列表的,而是针对序列类型的。
  • 谢谢你 - 如果你把它作为答案发布,我会勾选它。

标签: python list append add


【解决方案1】:

Common Sequence Operations 有一个文档。

s + tst 的串联

不是专门针对列表,而是针对序列类型。

【讨论】:

    猜你喜欢
    • 2020-01-11
    • 2012-03-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-30
    • 2018-08-20
    • 2021-02-03
    相关资源
    最近更新 更多