Skip to content

Commit

Permalink
Optimize SimpleTZ memory footprint by using __slots__
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Zverev committed Feb 19, 2019
1 parent ce3b1f1 commit b980520
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gpxpy/gpxfield.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def __init__(self, from_string, to_string):


class SimpleTZ(mod_datetime.tzinfo):
__slots__ = ('offset',)

def __init__(self, s=None):
self.offset = 0
if s and len(s) >= 2:
Expand Down

0 comments on commit b980520

Please sign in to comment.