[Python-checkins] r65512 - python/trunk/Lib/sqlite3/dbapi2.py

brett.cannon python-checkins at python.org
Mon Aug 4 23:19:41 CEST 2008


Author: brett.cannon
Date: Mon Aug  4 23:19:41 2008
New Revision: 65512

Log:
Remove usage of apply() in sqlite3 to silence warnings under -3.


Modified:
   python/trunk/Lib/sqlite3/dbapi2.py

Modified: python/trunk/Lib/sqlite3/dbapi2.py
==============================================================================
--- python/trunk/Lib/sqlite3/dbapi2.py	(original)
+++ python/trunk/Lib/sqlite3/dbapi2.py	Mon Aug  4 23:19:41 2008
@@ -39,13 +39,13 @@
 Timestamp = datetime.datetime
 
 def DateFromTicks(ticks):
-    return apply(Date, time.localtime(ticks)[:3])
+    return Date(*time.localtime(ticks)[:3])
 
 def TimeFromTicks(ticks):
-    return apply(Time, time.localtime(ticks)[3:6])
+    return Time(*time.localtime(ticks)[3:6])
 
 def TimestampFromTicks(ticks):
-    return apply(Timestamp, time.localtime(ticks)[:6])
+    return Timestamp(*time.localtime(ticks)[:6])
 
 version_info = tuple([int(x) for x in version.split(".")])
 sqlite_version_info = tuple([int(x) for x in sqlite_version.split(".")])


More information about the Python-checkins mailing list