STINNER Victor added the comment:

Importing a module looks slow to me. Importing a module which is a an *empty* 
.py file takes ~160 us.

$ python3 -I -m timeit -s "open('slow.py', 'wb').close(); import sys; import 
slow" "del sys.modules['slow']; import slow"
10000 loops, best of 3: 156 usec per loop

The difference betwen Python 3.4 and 3.5 is that enum.py imports indirectly 
more modules. The following two imports were added to types.py in Python 3.5:

import functools as _functools         
import collections.abc as _collections_abc

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25159>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to