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/1999-September/001000.html below:

[Python-Dev] Relative Package Imports

[Python-Dev] Relative Package Imports [Python-Dev] Relative Package ImportsBarry A. Warsaw bwarsaw@cnri.reston.va.us (Barry A. Warsaw)
Sun, 19 Sep 1999 03:01:29 -0400 (EDT)
>>>>> "TP" == Tim Peters <tim_one@email.msn.com> writes:

    TP> + "import package.*" is Java's way of spelling "from package
    TP> import *", and because of the preceding is the only way to get
    TP> convenient local names for classes imported from other
    TP> packages (note that can you can never import a package/module
    TP> in Java; you can only import a type name).  So most Java code
    TP> will do the above as

    TP> import java.awt.*;

    TP> and end up importing a gazillion names.  This sucks for the
    TP> same reasons "import *" sucks in Python, although Java catches
    TP> the name conflicts at compile time.

The interesting this is that, while the Java developers did this at
the language level, at the VM level, every class is "fully qualified";
you see the absolute path for every class name.

import pkg.pkg.* is the reason why you still have to have unique named 
classes like PyThinging or JWiggie, and yup it sucks.

-Barry



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