importlib: what is it, and why is it important?

E

excord80

Regarding this blog post: http://sayspy.blogspot.com/2009/01/importlib-is-now-in-python-31.html

When I use the ``import foo`` statement at the top of my program, I
get a module imported. python has a search path it follows, finds the
module, and makes it available to my program. Works nice. :)

So, could someone explain what importlib exactly is, and why this new
version that will be in Python 3.1 is significant? Will the import
statement work differently in 3.1, and if so, in what way?
 
B

Benjamin Peterson

excord80 said:
Regarding this blog post:
http://sayspy.blogspot.com/2009/01/importlib-is-now-in-python-31.html

Brett has made many other blog posts about his work on importlib. You might try
examining those.
So, could someone explain what importlib exactly is, and why this new
version that will be in Python 3.1 is significant? Will the import
statement work differently in 3.1, and if so, in what way?

Basically importlib is all of the complicated logic in the import statment
written in Python. The point is to make importing more extensible and easier to
change.

The behavior of the import statement shouldn't be any different or that is a bug.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top