2006-05-26から1日間の記事一覧
def intelligentcompare(s1, s2, ignorecase = False): """\ This function automatically detects numerical string for intelligent comparison. >>> cmp('2. a title of 2nd chapter', '10. a title of 10th chapter') 1 >>> intelligentcompare('2. a ti…
途中にとんでもないコードがあるけど気にすることはない import locale, operator def currencyformat(currency, i18n = False, conv = {}): localeconv = locale.localeconv() localeconv.update(conv) conv = localeconv cs = ((not i18n) and (conv['curr…