on "Namespaces"

Rhodri James rhodri at wildebst.demon.co.uk
Tue Nov 10 02:47:37 CET 2009

On Sun, 08 Nov 2009 21:20:23 -0000, webtourist <webtourist at gmail.com>  

> New bie Question:
> in "Zen of Python" - what exactly does the last one mean ? -
> Namespaces are one honking great idea -- let's do more of those!
> I mean why the emphasis ? Is it like saying "put modules into
> packages" in other programming paradigm s ?

Like all things zen, 'meaning' as applied to this koan is a shifting  
concept best considered after deep meditiation on... oh, who am I kidding.

If you keep names in separate namespaces, you are less likely to screw up  
by forgetting that you meant something else by that name 30 lines above.   
It's less about "put modules in packages" and more about "put code in  

Corollary: what happens after "from somewhere import *" is all your own  

Rhodri James *-* Wildebeest Herder to the Masses

More information about the Python-list mailing list