if <assignment>:

maney at pobox.com maney at pobox.com
Mon Nov 25 15:28:55 EST 2002


Steve Holden <sholden at holdenweb.com> wrote:
> Interesting that none of the responders referenced a FAQ article ... though
> since it refers to 2.0 as a future release it's clearly in some need of
> updating!

I'll plead that I probably read that back when I was in the process of
deciding whether to jump into Python or PHP but have since forgotten
it, obviously.  I was ultimately swayed by the reputation PHP had as
the cool web scripting language, and while I wouldn't say that I wasted
the year or so I was working with it (mostly on stolen time,
concurrently learning more than pidgin SQL and HTML and so forth), I'm
happy that I came back to Python.  It's a much better match for the
sort of web apps I'm working on.

Anyway, that FAQ item: I'm not sure I agree with this bit.

  An interesting phenomenon is that most experienced Python programmers
  recognize the "while 1" idiom and don't seem to be missing the
  assignment in expression construct much; it's only the newcomers who
  express a strong desire to add this to the language.

I am a relative newcomer to Python, but my problem is not that I fail
to *recognize* the various work-arounds such as the 'while 1' idiom
that's specifically being discussed.  Having implemented a service
tracking and management system in a dialect of Basic that lacked all
but the crudest of facilities (well, in the flow control department), I
know all about such workarounds, and recognize them; what I lack with
respect to the most experienced Pythoneers (in this regard) seems to be
only a *liking* for such workarounds.

As long as I'm talking about that FAQ item, I think it praises the
other kluge presented at the very bottom with insufficently strong
damns.  Was it Dijkstra who said that when you've said the same thing
twice [in a program] then you have very likely contradicted yourself? 
IME with C, that has been a larger source of errors than has operator=.




More information about the Python-list mailing list