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/2003-December/041000.html below:

[Python-Dev] Re: Christmas Wishlist

[Python-Dev] Re: Christmas Wishlist [Python-Dev] Re: Christmas WishlistGuido van Rossum guido at python.org
Mon Dec 15 11:03:31 EST 2003
> Barry Warsaw writes:
>  > V <wink>. Explicit global imports.  I want a way to spell "import this
>  > from the global standard library even if there's a this.py  in the local
>  > directory".
> 
> I like the syntax:
> 
>     import global <dotted-name>
> 
> and
> 
>     from global <dotted-name> import <name>
> 
> Look Guido, no new keywords!  ;-)

I'd much rather invent new syntax to spell *local* imports.  I like

  from .module import something

You can even generalize and write

  from ..module import something

to reference your package's parent package. :-)

--Guido van Rossum (home page: http://www.python.org/~guido/)

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