Next / Previous / Contents / Shipman's homepage

47. class JuvenalField: Juvenal plumage

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

baseclasses.py
# - - - - -   c l a s s   J u v e n a l F i e l d   - - - - -

class JuvenalField(SingleField):
    '''Represents a juvenal plumage code.
    '''

    VALID_CODES = "0123 "

    @staticmethod
    def scanField(encounter, scan, fieldName):
        '''Scan a juvenal plumage code.
        '''
        SingleField.scanField(encounter, scan, fieldName,
                              JuvenalField, "juvenal plumage")