[meta-sig] FYI: [comp.lang.python.*] Posting guidelines -- bi-weekly posting

Markus Fleck fleck@informatik.uni-bonn.de
Sat, 11 Jul 1998 05:49:36 +0200


David Ascher wrote:
> 
> > def my_hello(how_often):
> >         retval = ( how_often * "Hello World! " )  # "multiply" string
> >         return retval[:-1]                        # strip off trailing space
> 
> why the ()'s?

For readability - most people are probably not
used to "multiplying" strings, and the ()'s
should make it more clear that this is indeed
"some kind of multiplication expression". But
the parens are not strictly necessary, of course.

Yours,
Markus.

-- 
"The difference between Perl and Python is that
Python was designed, Perl was accumulated."