Next / Previous / Contents / Shipman's homepage

46. class FlightWearField: Flight feather wear

Represents a flight feather wear 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 l i g h t W e a r F i e l d   - - - - -

class FlightWearField(SingleField):
    '''Represents a flight feather wear code.
    '''

    VALID_CODES = "012345 "

    @staticmethod
    def scanField(encounter, scan, fieldName):
        '''Scan a flight feather wear code.
        '''
        SingleField.scanField(encounter, scan, fieldName,
                              FlightWearField, "ff wear")