[Python-Dev] Challenge about print >> None

Vladimir Marangozov Vladimir.Marangozov@inrialpes.fr
Tue, 12 Sep 2000 21:43:32 +0200 (CEST)


Fredrik Lundh wrote:
> 
> vladimir wrote:
> > In the case of extended print, half of us perceive that as a mix of
> > concepts unrelated to Python, the other half sees them as natural
> > for specifying default behavior in Python.
> 
> Sigh.  None doesn't mean "default", it means "doesn't exist"
> "nothing" "ingenting" "nada" "none" etc.
> 
> "def foo(): return" uses None to indicate that there was no
> return value.
> 
> "map(None, seq)" uses None to indicate that there are really
> no function to map things through.
> 
> "import" stores None in sys.modules to indicate that certain
> package components doesn't exist.
> 
> "print >>None, value" uses None to indicate that there is
> really no redirection -- in other words, the value is printed
> in the usual location.

PEP that without the import example (it's obfuscated). If you can add
more of them, you'll save yourself time answering questions. I couldn't
have done it, because I still belong to my half <wink>.

hard-to-make-progress-but-constructivism-wins-in-the-end'ly y'rs
-- 
       Vladimir MARANGOZOV          | Vladimir.Marangozov@inrialpes.fr
http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252