[ZPT] REQUEST argument
Guido van Rossum
guido@digicool.com
Mon, 14 May 2001 09:57:35 -0500
> Don't undefined values raise an exception only where they cause some
> kind of conflict, in Python?
In pure Python any undefined variable raises a NameError and any
undefined attribute raises an AttributeError. Of course this is only
once the entire search fails (attributes search base classes,
global variables search global and built-in).
> > Using a C preprocessor analogy: DTML has #if but not #ifdef, so we're
> > making #if do the work of #ifdef -- which usually works.
>
> Actually, seems like python's if == (CPP#if or CPP#ifdef), no? Anyway, why
> bother relating it to C, unless you're writing a library?
No, Python's if is unlike either of CPP's versions. I just meant this
as an analogy for those of us who are intimately familiar with
CPP. :-)
--Guido van Rossum (home page: http://www.python.org/~guido/)