prettier.py 文件源码

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

项目:python-devtools 作者: samuelcolvin 项目源码 文件源码
def __init__(self,
                 indent_step=4,
                 indent_char=' ',
                 repr_strings=False,
                 simple_cutoff=10,
                 width=120,
                 yield_from_generators=True):
        self._indent_step = indent_step
        self._c = indent_char
        self._repr_strings = repr_strings
        self._repr_generators = not yield_from_generators
        self._simple_cutoff = simple_cutoff
        self._width = width
        self._type_lookup = [
            (dict, self._format_dict),
            (str, self._format_str),
            (bytes, self._format_bytes),
            (tuple, self._format_tuples),
            ((list, set, frozenset), self._format_list_like),
            (collections.Generator, self._format_generators),
        ]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号