477938 (1) [Avatar] Offline
#1
Hi,

In chapter 10 section 10.2 there is an example of reloading a module using imp.reload(). When I worked through the example I got a message telling me imp is deprecated (the documentation tells me "Deprecated since version 3.4": The imp package is pending deprecation in favor of importlib"). I'm using version 3.5.3.

Re-running the example with importlib.reload() seems to work fine.

BTW: Great book! I'm learning Python having used Java for a few years now. So far it's very interesting.

Cheers
naomi.ceder (75) [Avatar] Offline
#2
Quite right - imp was deprecated as of Python 3.4 and importlib should be used instead. So far I'd missed that in revisions, so I appreciate the report. It will go into my copy tonight!

Thank you so much for taking the time to report that!

And I'm happy that the book is being useful! Welcome to Python! smilie

Cheers,
Naomi