why no "do : until"?

Fredrik Lundh fredrik at effbot.org
Wed Jan 3 03:52:02 EST 2001


Steve Lamb wrote:
> I think my favorite was that one shouldn't init variables to arbitrary
> values.

In my dictionary, "arbitrary" means:

    "based on or determined by individual preference rather
    than by necessity or the intrinsic nature of something"

> That's the whole point of initing a variable, to set to to a known,
> arbitrary, value.

Steve's not only smarter than me (if I had an IQ of 5 million, I'd
also be smarter than me), he's obviously also using a different
dictionary.  Or are all these really "arbitrary" initial values:

    count = 0 # nothing yet

    stack = [] # it's empty

    port = 21 # default FTP port

    file = None # haven't opened it yet

    temperature = 25 # no, it's not 25 degrees now, but if
    # I don't initialize it to this, my code won't work.  don't
    # forget to change this if the test 200 lines below do
    # change.  and yes, if my program claims it's 25 degrees
    # outside (or whatever this variable is set to), it might
    # be a bug.  or maybe it isn't.  you have been warned.
    # you're happy you read the comments, aren't you?

All real programmers already know the difference, of course.

stupid-ly yrs /F





More information about the Python-list mailing list