Skip to content

Commit 0115ee4

Browse files
Unrequire ascii
1 parent e652581 commit 0115ee4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/_strptime.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ def __init__(self, locale_time=None):
313313
'Z'),
314314
'%': '%'}
315315
for d in 'dmyHIMS':
316-
mapping['O' + d] = r'(?P<%s>[0-9][0-9]|[0-9]| [0-9])' % d
317-
mapping['Ow'] = r'(?P<w>[0-9])'
316+
mapping['O' + d] = r'(?P<%s>\d\d|\d| \d)' % d
317+
mapping['Ow'] = r'(?P<w>\d)'
318318
mapping['W'] = mapping['U'].replace('U', 'W')
319319
base.__init__(mapping)
320320
base.__setitem__('X', self.pattern(self.locale_time.LC_time))

0 commit comments

Comments
 (0)