from collections import OrderedDict


class Event:
    # ----------------------------------------------------------------------
    def __init__(self, pfields=None):
        """Constructor"""
        # OrderedDict here
        self.pfields = OrderedDict()
        for item in pfields:
            self.pfields[item] = ''
        #rhythm sometimes used as basis for calculating other params, so save it here
        self.rhythm = None

    def __str__(self):
        return 'i'+'\t'.join(map(str, self.pfields.values()))

cf528e28bcbdbbafe67338f78c0d5e6c044b3a59
<mask token>

<mask token>


class Event:

    def __init__(self, pfields=None):
        """Constructor"""
        self.pfields = OrderedDict()
        for item in pfields:
            self.pfields[item] = ''
        self.rhythm = None
    <mask token>

<mask token>


class Event:

    def __init__(self, pfields=None):
        """Constructor"""
        self.pfields = OrderedDict()
        for item in pfields:
            self.pfields[item] = ''
        self.rhythm = None

    def __str__(self):
        return 'i' + '\t'.join(map(str, self.pfields.values()))

from collections import OrderedDict


class Event:

    def __init__(self, pfields=None):
        """Constructor"""
        self.pfields = OrderedDict()
        for item in pfields:
            self.pfields[item] = ''
        self.rhythm = None

    def __str__(self):
        return 'i' + '\t'.join(map(str, self.pfields.values()))

from collections import OrderedDict


class Event:
    # ----------------------------------------------------------------------
    def __init__(self, pfields=None):
        """Constructor"""
        # OrderedDict here
        self.pfields = OrderedDict()
        for item in pfields:
            self.pfields[item] = ''
        #rhythm sometimes used as basis for calculating other params, so save it here
        self.rhythm = None

    def __str__(self):
        return 'i'+'\t'.join(map(str, self.pfields.values()))
