To all those who talked about hating the symbology in Perl and the
suggestion that it should be removed from a later version.  I just
remembered what you get for that symbology that I really do like about
Perl: variable interpolation in strings:

C:
sprintf(newstr,"%s %d %f",s,n,r);

Becomes a little nicer in Python with:
newstr = '%s %d %f' % (s,n,r)

Although it's worse with:
newstr = s + ' ' + str(n) + ' ' + str(r)

But in my mind nothing beats the Perl statement:
newstr = "$s $n $r";

for clarity, ease of use, and maintainability.

Jeff


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to