component_tuple.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:pyomo 作者: Pyomo 项目源码 文件源码
def children(self, return_key=False):
        """Iterate over the children of this container.

        Args:
            return_key (bool): Set to :const:`True` to
                indicate that the return type should be a
                2-tuple consisting of the child storage key
                and the child object. By default, only the
                child objects are returned.

        Returns:
            iterator of objects or (key,object) tuples
        """
        if return_key:
            return enumerate(self._data)
        else:
            return self._data.__iter__()

    #
    # Define the Sequence abstract methods
    #
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号