[Python-checkins] bpo-41065: Use zip-strict in zoneinfo (GH-21031)
Ram Rachum
webhook-mailer at python.org
Tue Jun 23 10:21:36 EDT 2020
https://github.com/python/cpython/commit/bc43f6e21244f31d25896875430174cd4ac7604c
commit: bc43f6e21244f31d25896875430174cd4ac7604c
branch: master
author: Ram Rachum <ram at rachum.com>
committer: GitHub <noreply at github.com>
date: 2020-06-23T10:21:26-04:00
summary:
bpo-41065: Use zip-strict in zoneinfo (GH-21031)
files:
M Lib/zoneinfo/_common.py
diff --git a/Lib/zoneinfo/_common.py b/Lib/zoneinfo/_common.py
index 41c898f37e4f8..4c24f01bd7b27 100644
--- a/Lib/zoneinfo/_common.py
+++ b/Lib/zoneinfo/_common.py
@@ -136,8 +136,7 @@ class _TZifHeader:
]
def __init__(self, *args):
- assert len(self.__slots__) == len(args)
- for attr, val in zip(self.__slots__, args):
+ for attr, val in zip(self.__slots__, args, strict=True):
setattr(self, attr, val)
@classmethod
More information about the Python-checkins
mailing list