many_to_one.py 文件源码

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

项目:matchpy 作者: HPAC 项目源码 文件源码
def _get_name_for_position(position: List[int], variables: Container[str]) -> str:
        new_name = 'i{}'.format('.'.join(map(str, position)))
        if new_name in variables:
            counter = 1
            while '{}_{}'.format(new_name, counter) in variables:
                counter += 1
            new_name = '{}_{}'.format(new_name, counter)
        return new_name
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号