Modernize: Unicode literals

This commit is contained in:
Virgil Dupras
2013-05-27 14:49:40 -04:00
parent 2f5a0e3b41
commit eecf1ac9c1
11 changed files with 11 additions and 5 deletions

View File

@@ -27,6 +27,7 @@ Notes:
History: History:
0.2: n2w, to_card, to_ord, to_ordnum now imported correctly 0.2: n2w, to_card, to_ord, to_ordnum now imported correctly
''' '''
from __future__ import unicode_literals
import locale as _locale import locale as _locale
# Correct omissions in locale: # Correct omissions in locale:

View File

@@ -28,6 +28,7 @@ History
add to_currency() and to_year() add to_currency() and to_year()
''' '''
from __future__ import unicode_literals
from num2word_EU import Num2Word_EU from num2word_EU import Num2Word_EU
#//TODO: Use German error messages #//TODO: Use German error messages

View File

@@ -35,7 +35,7 @@ History:
1.1: to_ordinal_num() fixed for 11,12,13 1.1: to_ordinal_num() fixed for 11,12,13
''' '''
from __future__ import division from __future__ import division, unicode_literals
import num2word_EU import num2word_EU

View File

@@ -29,7 +29,7 @@ Usage:
''' '''
from __future__ import unicode_literals
from num2word_EN import Num2Word_EN from num2word_EN import Num2Word_EN

View File

@@ -31,7 +31,7 @@ Usage:
History: History:
1.0: Split from num2word_EN with the addition of to_currency() 1.0: Split from num2word_EN with the addition of to_currency()
''' '''
from __future__ import unicode_literals
from num2word_EN import Num2Word_EN from num2word_EN import Num2Word_EN

View File

@@ -25,6 +25,7 @@ History:
Todo: Todo:
Currency (pounds/shillings/pence) Currency (pounds/shillings/pence)
''' '''
from __future__ import unicode_literals
from num2word_EN_GB import Num2Word_EN_GB from num2word_EN_GB import Num2Word_EN_GB
class Num2Word_EN_GB_old(Num2Word_EN_GB): class Num2Word_EN_GB_old(Num2Word_EN_GB):

View File

@@ -27,6 +27,7 @@ History:
String interpolation where it makes things clearer String interpolation where it makes things clearer
add to_currency() add to_currency()
''' '''
from __future__ import unicode_literals
from num2word_EU import Num2Word_EU from num2word_EU import Num2Word_EU
#//TODO: correct orthographics #//TODO: correct orthographics

View File

@@ -19,6 +19,7 @@ Data from:
History: History:
1.1: add to_currency() 1.1: add to_currency()
''' '''
from __future__ import unicode_literals
from num2word_base import Num2Word_Base from num2word_base import Num2Word_Base
class Num2Word_EU(Num2Word_Base): class Num2Word_EU(Num2Word_Base):

View File

@@ -30,6 +30,7 @@ History:
String interpolation where it makes things clearer String interpolation where it makes things clearer
to_currency() added [to_year works by default] to_currency() added [to_year works by default]
''' '''
from __future__ import unicode_literals
from num2word_EU import Num2Word_EU from num2word_EU import Num2Word_EU
#//TODO: error messages in French #//TODO: error messages in French

View File

@@ -72,6 +72,7 @@ tūkstantis du šimtai trisdešimt keturi litai, penkiasdešimt šeši centai
>>> print(to_currency(-1251985, cents = False)) >>> print(to_currency(-1251985, cents = False))
minus dvylika tūkstančių penki šimtai devyniolika litų, 85 centai minus dvylika tūkstančių penki šimtai devyniolika litų, 85 centai
""" """
from __future__ import unicode_literals
ZERO = (u'nulis',) ZERO = (u'nulis',)

View File

@@ -17,8 +17,7 @@ History:
add to_year() and to_currency() stubs add to_year() and to_currency() stubs
''' '''
from __future__ import unicode_literals
from __future__ import generators
from orderedmapping import OrderedMapping from orderedmapping import OrderedMapping