A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-October/129638.html below:

[Python-Dev] Making submodules available when importing top one

[Python-Dev] Making submodules available when importing top one [Python-Dev] Making submodules available when importing top oneFacundo Batista facundobatista at gmail.com
Wed Oct 16 18:26:11 CEST 2013
(all this using Python 3.4.0a3+)

In the stdlib, I see that (as an example):

>>> import os
>>> os.path.abspath
<function abspath at 0xb7123734>
>>> os.path
<module 'posixpath' from '/.../python/trunk/Lib/posixpath.py'>


However, for other (newer) modules:

>>> import urllib
>>> urllib.requests.urlopen
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'requests'
>>> import concurrent
>>> concurrent.futures
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'futures'


So, is there a reason to not expose the submodules in the top module?
This should be fixed?

Thanks!

-- 
.    Facundo

Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/
Twitter: @facundobatista
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4