Equivalent in Python?

Tim Hammerquist tim at vegeta.ath.cx
Tue Apr 30 20:16:36 EDT 2002


Philip Swartzleonard graced us by uttering:
> Tim Hammerquist || Tue 30 Apr 2002 02:38:50p:
> 
>>> But if you just want to increment something, use 'foo+=1'. Exactly
>>> the same, except one more character and only works on a line of it's
>>> own (avoiding above said doom... man pointer-walking funcitons in C
>>> are nuts with that... =)
>> 
>> Well, yes and no. The type being incremented is a string, not an
>> int. For example: [..]
> 
> Oh... =). I figured it was just a wierd way of stating a variable
> name.  But then, i have <2 minutes of total perl experience (if
> anything, changing shebangs and 'global settings' at the top of a few.
> maybe.)

No harm. It is one of the (much) less self-explanatory examples of
syntactic sugar.

Ironic that with all the talk of Perl's extraneous non-alphanumeric
symbols throughout its syntax, in this case the quotes were actually
meant to quote! =)

As a recovering Perler, I just appreciate you're not blindly
Perl-bashing. Thx. =)

Tim Hammerquist
-- 
If there's anything more important than my
ego around, I want it caught and shot now.
    -- Zaphod Beeblebrox, "The Hitchhiker's Guide to the Galaxy"



More information about the Python-list mailing list