Skip to content

Commit eb546ab

Browse files
authored
optimize the ArchiveEntry class with __slots__ (#94)
1 parent 7b97d8b commit eb546ab

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

libarchive/entry.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ def format_time(seconds, nanos):
2424

2525
class ArchiveEntry(object):
2626

27+
__slots__ = ('_archive_p', '_entry_p')
28+
2729
def __init__(self, archive_p, entry_p):
2830
self._archive_p = archive_p
2931
self._entry_p = entry_p

0 commit comments

Comments
 (0)