group.py 文件源码

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

项目:stig 作者: rndusr 项目源码 文件源码
def __init__(self, *widgets, cls=urwid.Columns, **kwargs):
        """Create new Group widget

        Widgets can be added by providing mappings as positional arguments.
        Each mapping is then provided to the `add` method as keyword
        arguments.

        cls: `Columns` or `Pile` (or derivatives of either)

        All other keyword arguments are forwarded to `cls` on instantiation.
        """
        self._cls = cls
        self._main = cls([], **kwargs)
        self._items_list = []
        self._items_dict = {}
        # Add initial widgets
        for widget in widgets:
            self.add(**widget)
        super().__init__(self._main)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号