Next / Previous / Contents / Shipman's homepage

44. class BodyMoltField: Body molt

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

baseclasses.py
# - - - - -   c l a s s   B o d y M o l t F i e l d   - - - - -

class BodyMoltField(SingleField):
    '''Represents a body molt code.
    '''

    VALID_CODES = "01234 "

    @staticmethod
    def scanField(encounter, scan, fieldName):
        '''Scan a body molt field.
        '''
        SingleField.scanField(encounter, scan, fieldName,
                                BodyMoltField, "body molt")