mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Update to Python 2.3, getting rid of backward compatiblity crud.
This commit is contained in:
parent
235c8eba62
commit
24f79762a1
5 changed files with 20 additions and 85 deletions
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2002 Python Software Foundation
|
||||
# Copyright (C) 2002-2004 Python Software Foundation
|
||||
|
||||
"""Email address parsing code.
|
||||
|
||||
|
@ -6,13 +6,6 @@ Lifted directly from rfc822.py. This should eventually be rewritten.
|
|||
"""
|
||||
|
||||
import time
|
||||
from types import TupleType
|
||||
|
||||
try:
|
||||
True, False
|
||||
except NameError:
|
||||
True = 1
|
||||
False = 0
|
||||
|
||||
SPACE = ' '
|
||||
EMPTYSTRING = ''
|
||||
|
@ -130,7 +123,7 @@ def parsedate_tz(data):
|
|||
def parsedate(data):
|
||||
"""Convert a time string to a time tuple."""
|
||||
t = parsedate_tz(data)
|
||||
if isinstance(t, TupleType):
|
||||
if isinstance(t, tuple):
|
||||
return t[:9]
|
||||
else:
|
||||
return t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue