babel_misc.py 文件源码

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

项目:talks-python-i18n_l10n 作者: zgoda-mobica 项目源码 文件源码
def format_class():
    print('Utility class that holds all formating functionality for single locale')
    date = datetime.date(1874, 5, 29)
    amount = (284.55, 'CNY')
    for (name, symbol, params) in LOCALES:
        locale = Locale(*params)
        fmt = Format(locale=locale)
        args = [name]
        args.append(fmt.date(date, format='full'))
        args.append(fmt.currency(*amount))
        print('\tFormats for {0} - date: {1}, currency: {2}'.format(*args))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号