What exactly are “containers” in python? (And what are all the python container types?)

前端 未结 3 416
礼貌的吻别
礼貌的吻别 2020-12-12 11:22

The python documentation frequently speaks of \"containers\". E.g. :

If check_circular is False (default: True), then the circular reference check f

3条回答
  •  执笔经年
    2020-12-12 11:53

    Container are all python objects that contain other object like list or dict. The Container type is an ABC, it behave like an interface. A Container is a class that implements the __contains__ method.

    Here is the doc

提交回复
热议问题