1. Don't forget the other advantage of 'wax.Button', which is that outsiders don't know the wax names.

    If you ask me for help with your code, I don't want to be distracted trying to figure out if Button is some class in this module or in your project; or if it's part of some external lib.

    'import wax as w' is ok, since I'll catch on that you were trying to reduce typing and learn your abbreviation.

    'from wax import Button,Label,Frame' is ok too, since I can quickly learn the source of the foreign names with a search.

      posted by Drew Perttula at 02:58:05 PM on September 26, 2004  
  2. I like "import wax " much, but the main drawback I see is that if you do lazy import, you won't be able to do module inspection at the interpreter prompt, which is a great way of learning the toolkit.


      posted by Olivier Poyen at 07:05:58 AM on September 27, 2004  
  3. I have no opinion on whether or not to do lazy imports, but I strongly recomend "import wax" over "from wax import *". The import * syntax is (as I'm sure you already know) widely discouraged for a number of very good reasons in ALL Python code, not just wax.
      posted by Michael Chermside at 12:26:00 PM on September 27, 2004