Add a new boolean format 1: True ' ': False

This commit is contained in:
Eduard Carreras 2015-10-19 09:27:11 +02:00
parent 4a169fe696
commit 088a5ae97b

View file

@ -36,7 +36,7 @@ from .exception import RetrofixException
__all__ = ['Field', 'Char', 'Const', 'Account', 'Number', 'Numeric', 'Integer',
'Date', 'Selection', 'Boolean', 'SIGN_DEFAULT', 'SIGN_12', 'SIGN_N',
'SIGN_POSITIVE', 'BOOLEAN_01', 'BOOLEAN_12', 'BOOLEAN_X']
'SIGN_POSITIVE', 'BOOLEAN_01', 'BOOLEAN_12', 'BOOLEAN_X', 'BOOLEAN_W1']
class Field(object):
@ -263,6 +263,11 @@ BOOLEAN_X = {
False: ' ',
}
BOOLEAN_W1 = {
True: '1',
False: ' ',
}
class Boolean(Field):
def __init__(self, formatting=None):