diff options
author | Raymond Hettinger <python@rcn.com> | 2002-10-21 03:08:20 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2002-10-21 03:08:20 (GMT) |
commit | d058f08e0324e84fec3010f32f4b377bed94e897 (patch) | |
tree | 932055c08b560ae6b7d027af78479e07dabe213e | |
parent | 7aa7f2eb0d87e23f218a0a813527f28ac4a4d228 (diff) | |
download | cpython-d058f08e0324e84fec3010f32f4b377bed94e897.zip cpython-d058f08e0324e84fec3010f32f4b377bed94e897.tar.gz cpython-d058f08e0324e84fec3010f32f4b377bed94e897.tar.bz2 |
Eliminate unused instance variable
-rw-r--r-- | Lib/calendar.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/calendar.py b/Lib/calendar.py index b0834c9..d172b24 100644 --- a/Lib/calendar.py +++ b/Lib/calendar.py @@ -35,10 +35,10 @@ class _localized_month: self.format = format def __getitem__(self, i): - self.data = [strftime(self.format, (2001, j, 1, 12, 0, 0, 1, 1, 0)) + data = [strftime(self.format, (2001, j, 1, 12, 0, 0, 1, 1, 0)) for j in range(1, 13)] - self.data.insert(0, "") - return self.data[i] + data.insert(0, "") + return data[i] def __len__(self): return 13 @@ -49,9 +49,9 @@ class _localized_day: def __getitem__(self, i): # January 1, 2001, was a Monday. - self.data = [strftime(self.format, (2001, 1, j+1, 12, 0, 0, j, j+1, 0)) + data = [strftime(self.format, (2001, 1, j+1, 12, 0, 0, j, j+1, 0)) for j in range(7)] - return self.data[i] + return data[i] def __len__(self_): return 7 |