while (a=b()) ...
Gordon McMillan
gmcm at hypernet.com
Sat May 15 12:15:38 EDT 1999
Paul Boddie wrote:
> Anyway, I feel that this discussion is not necessarily pointless
> because people don't have a need for improvements in this area of
> Python, but rather because people easily divide into the two main
> camps: those who just want to do "while a = b" because they are
> comfortable with it (from C-style languages), and those who don't
> find that acceptable at all.
Well, those are the 2 (vocal) camps formed in response to "let's do
it the C way".
There are 2 responses to "while 1" - one camp finds that fine, the
other finds it "ugly".
I'm comfortable with the C way, but I find the counter-arguments
("it's dangerous") to have some validity. As a C / C++ coder, I'm
willing to live with some danger, but I have sympathy for those who
are not. So I'll do without in Python.
I have zero sympathy for those who wish to avoid the C "mistake" of
easily confused syntax by deliberately complexifying the syntax of
assignment in expression. The only pieces of Python syntax I've ever
had to look up multiple times are the quasi-functional verbs. Those
are definitely "advanced" Python. Loops are not. "while 1" may not be
aesthetically pleasing to those of a certain mind-set, but it does
_not_ require a trip through the docs to figure out what's going on.
The volume, regularity and constant appeals to religeous dogma have
moved me firmly into the "live with it" camp.
longing-for-a-good-whitespace-thread-ly y'rs
- Gordon
More information about the Python-list
mailing list