diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-02-21 16:33:24 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-02-21 16:33:24 (GMT) |
commit | 3a9a96c77840ceb23447fc75f02fcf9d56d052e6 (patch) | |
tree | 85782af59ad0afb07e65cfad71b341e9fece1d82 /Lib | |
parent | add8b246f63dce24006a45ecf24b21491e85ac54 (diff) | |
download | cpython-3a9a96c77840ceb23447fc75f02fcf9d56d052e6.zip cpython-3a9a96c77840ceb23447fc75f02fcf9d56d052e6.tar.gz cpython-3a9a96c77840ceb23447fc75f02fcf9d56d052e6.tar.bz2 |
replace exec with simple assignments
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/imaplib.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py index 4bb741f..51571f9 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -907,7 +907,6 @@ Mon2num = {'Jan': 1, 'Feb': 2, 'Mar': 3, 'Apr': 4, 'May': 5, 'Jun': 6, 'Jul': 7, 'Aug': 8, 'Sep': 9, 'Oct': 10, 'Nov': 11, 'Dec': 12} def Internaldate2tuple(resp): - """Convert IMAP4 INTERNALDATE to UT. Returns Python time module tuple. @@ -920,8 +919,13 @@ def Internaldate2tuple(resp): mon = Mon2num[mo.group('mon')] zonen = mo.group('zonen') - for name in ('day', 'year', 'hour', 'min', 'sec', 'zoneh', 'zonem'): - exec "%s = int(mo.group('%s'))" % (name, name) + day = int(mo.group(day)) + year = int(mo.group(year)) + hour = int(mo.group(hour)) + min = int(mo.group(min)) + sec = int(mo.group(sec)) + zoneh = int(mo.group(zoneh)) + zonem = int(mo.group(zonem)) # INTERNALDATE timezone must be subtracted to get UT |