recipe-546530.py 文件源码

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

项目:code 作者: ActiveState 项目源码 文件源码
def _printf(fmt, *args, **print3opts):
    '''Formatted print to sys.stdout or given stream.

        *print3opts* -- print keyword arguments, like Python 3.+
    '''
    if print3opts:  # like Python 3.0
        f = print3opts.get('file', None) or sys.stdout
        if args:
            f.write(fmt % args)
        else:
            f.write(fmt)
        f.write(print3opts.get('end', linesep))
        if print3opts.get('flush', False):
            f.flush()
    elif args:
        print(fmt % args)
    else:
        print(fmt)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号