##// END OF EJS Templates
util: don't use mutable default argument value...
Gregory Szorc -
r31393:8b6927eb default
parent child Browse files
Show More
@@ -1827,9 +1827,11 b' def parsetimezone(s):'
1827
1827
1828 return None, s
1828 return None, s
1829
1829
1830 def strdate(string, format, defaults=[]):
1830 def strdate(string, format, defaults=None):
1831 """parse a localized time string and return a (unixtime, offset) tuple.
1831 """parse a localized time string and return a (unixtime, offset) tuple.
1832 if the string cannot be parsed, ValueError is raised."""
1832 if the string cannot be parsed, ValueError is raised."""
1833 defaults = defaults or []
1834
1833 # NOTE: unixtime = localunixtime + offset
1835 # NOTE: unixtime = localunixtime + offset
1834 offset, date = parsetimezone(string)
1836 offset, date = parsetimezone(string)
1835
1837
General Comments 0
You need to be logged in to leave comments. Login now