Skip to content

Commit

Permalink
FIXUP to above
Browse files Browse the repository at this point in the history
  • Loading branch information
dtcooper committed Feb 2, 2013
1 parent 47bcc45 commit c9cbc4c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fitparse/records.py
Expand Up @@ -7,13 +7,11 @@ class RecordBase(object):
__slots__ = ()

def __init__(self, *args, **kwargs):
for slot_name, value in zip(self.__slots__, args):
# WARNING: use of map(None, l1, l2) equivalent to zip_longest in py3k
for slot_name, value in map(None, self.__slots__, args):
setattr(self, slot_name, value)
for slot_name, value in kwargs.iteritems():
setattr(self, slot_name, value)
for slot_name in self.__slots__:
if not hasattr(self, slot_name):
setattr(self, slot_name, None)


class MessageHeader(RecordBase):
Expand Down

0 comments on commit c9cbc4c

Please sign in to comment.