Skip to content

Commit

Permalink
optimize the ArchiveEntry class with __slots__ (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
Changaco authored Oct 20, 2019
1 parent 7b97d8b commit eb546ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libarchive/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def format_time(seconds, nanos):

class ArchiveEntry(object):

__slots__ = ('_archive_p', '_entry_p')

def __init__(self, archive_p, entry_p):
self._archive_p = archive_p
self._entry_p = entry_p
Expand Down

0 comments on commit eb546ab

Please sign in to comment.