Skip to content

Commit 4b04bdf

Browse files
authored
ok
1 parent 3796884 commit 4b04bdf

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

Lib/sqlite3/dbapi2.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
# misrepresented as being the original software.
2121
# 3. This notice may not be removed or altered from any source distribution.
2222

23-
import datetime
2423
import time
2524
import collections.abc
25+
import datetime
2626

2727
from _sqlite3 import *
2828

@@ -37,12 +37,15 @@
3737
Timestamp = datetime.datetime
3838

3939
def DateFromTicks(ticks):
40+
import time # Lazy, to improve import time
4041
return Date(*time.localtime(ticks)[:3])
4142

4243
def TimeFromTicks(ticks):
44+
import time # Lazy, to improve import time
4345
return Time(*time.localtime(ticks)[3:6])
4446

4547
def TimestampFromTicks(ticks):
48+
import time # Lazy, to improve import time
4649
return Timestamp(*time.localtime(ticks)[:6])
4750

4851

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Halve the import time of :mod:`sqlite3`.

0 commit comments

Comments
 (0)