[wwwsearch-commits] r26626 - wwwsearch/ClientCookie/trunk/ClientCookie

jjlee at codespeak.net jjlee at codespeak.net
Mon May 1 00:53:37 CEST 2006


Author: jjlee
Date: Mon May  1 00:53:37 2006
New Revision: 26626

Modified:
   wwwsearch/ClientCookie/trunk/ClientCookie/_Util.py
Log:
Whitespace normalisation (remove tabs) (Dmitry Vasiliev <dima at hlabs.spb.ru>)

Modified: wwwsearch/ClientCookie/trunk/ClientCookie/_Util.py
==============================================================================
--- wwwsearch/ClientCookie/trunk/ClientCookie/_Util.py	(original)
+++ wwwsearch/ClientCookie/trunk/ClientCookie/_Util.py	Mon May  1 00:53:37 2006
@@ -98,12 +98,12 @@
 
     # Return 1 for leap years, 0 for non-leap years
     def isleap(year):
-	return year % 4 == 0 and (year % 100 <> 0 or year % 400 == 0)
+        return year % 4 == 0 and (year % 100 <> 0 or year % 400 == 0)
 
     # Return number of leap years in range [y1, y2)
     # Assume y1 <= y2 and no funny (non-leap century) years
     def leapdays(y1, y2):
-	return (y2+3)/4 - (y1+3)/4
+        return (y2+3)/4 - (y1+3)/4
 
     EPOCH = 1970
     def timegm(tuple):
@@ -220,12 +220,12 @@
     sec = int(sec)
 
     if yr < 1000:
-	# find "obvious" year
-	cur_yr = time.localtime(time.time())[0]
-	m = cur_yr % 100
-	tmp = yr
-	yr = yr + cur_yr - m
-	m = m - tmp
+        # find "obvious" year
+        cur_yr = time.localtime(time.time())[0]
+        m = cur_yr % 100
+        tmp = yr
+        yr = yr + cur_yr - m
+        m = m - tmp
         if abs(m) > 50:
             if m > 0: yr = yr + 100
             else: yr = yr - 100
@@ -257,7 +257,7 @@
         (?:\s+|[-\/])
     (\d+)              # year
     (?:
-	  (?:\s+|:)    # separator before clock
+          (?:\s+|:)    # separator before clock
        (\d\d?):(\d\d)  # hour:min
        (?::(\d\d))?    # optional seconds
     )?                 # optional clock


More information about the wwwsearch-commits mailing list