From: Rob Browning Date: Sun, 14 Aug 2022 18:29:59 +0000 (-0500) Subject: stat_result: specify __slots__ X-Git-Url: https://arthur.barton.de/gitweb/?p=bup.git;a=commitdiff_plain;h=3914d75c42f60d71ace4957bd31d3009d9f8ed0c stat_result: specify __slots__ We're likely to have a lot of these, so might as well save the memory. Signed-off-by: Rob Browning Tested-by: Rob Browning --- diff --git a/lib/bup/xstat.py b/lib/bup/xstat.py index b334ffd..a094129 100644 --- a/lib/bup/xstat.py +++ b/lib/bup/xstat.py @@ -102,6 +102,8 @@ def _fix_cygwin_id(id): class stat_result: + __slots__ = ('st_mode', 'st_ino', 'st_dev', 'st_nlink', 'st_uid', 'st_gid', + 'st_rdev', 'st_size', 'st_atime', 'st_mtime', 'st_ctime') @staticmethod def from_xstat_rep(st): global _cygwin_sys