This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dilyan.palauzov
Recipients dilyan.palauzov
Date 2018-02-08.16:09:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1518106189.47.0.467229070634.issue32801@psf.upfronthosting.co.za>
In-reply-to
Content
diff --git a/Lib/_strptime.py b/Lib/_strptime.py
--- a/Lib/_strptime.py
+++ b/Lib/_strptime.py
@@ -238,10 +238,7 @@ class TimeRE(dict):
 
         """
         to_convert = sorted(to_convert, key=len, reverse=True)
-        for value in to_convert:
-            if value != '':
-                break
-        else:
+        if all(value == '' for value in to_convert):
             return ''
         regex = '|'.join(re_escape(stuff) for stuff in to_convert)
         regex = '(?P<%s>%s' % (directive, regex)
History
Date User Action Args
2018-02-08 16:09:49dilyan.palauzovsetrecipients: + dilyan.palauzov
2018-02-08 16:09:49dilyan.palauzovsetmessageid: <1518106189.47.0.467229070634.issue32801@psf.upfronthosting.co.za>
2018-02-08 16:09:49dilyan.palauzovlinkissue32801 messages
2018-02-08 16:09:49dilyan.palauzovcreate