Next / Previous / Contents / Shipman's homepage

43. class FatField: Fat class

Represents a fat code; derived from Section 27, “class SingleField: Generic single-character field”. For valid codes, see the specification.

baseclasses.py
# - - - - -   c l a s s   F a t F i e l d   - - - - -

class FatField(SingleField):
    '''Represents a fat code.
    '''

    VALID_CODES = "01234567 "

    @staticmethod
    def scanField(encounter, scan, fieldName):
        '''Scan a fat code.
        '''
        SingleField.scanField(encounter, scan, fieldName,
                               FatField, "fat")