Stupid string formatting question

Steve Holden sholden at holdenweb.com
Fri May 17 19:13:45 EDT 2002


This wouldn't, by any chance, be an untested response would it? I submit
that the parentheses will make no difference whatsover. In fact, you can put
an extra pair in if you want!

no-difference-between-x-and-(x)-ly y'rs  - steve
--
-----------------------------------------------------------------------
Steve Holden                                 http://www.holdenweb.com/
Python Web Programming                http://pydish.holdenweb.com/pwp/
-----------------------------------------------------------------------


"David K. Trudgett" <dkt at registriesltd.com.au> wrote in message
news:mailman.1021599694.32659.python-list at python.org...
> On Friday 2002-05-17 at 01:19:59 -0000, Michael S. Fischer wrote:
>
> > Why can't I do this?
> >
> >     def foo(x):
> >       # Do some operations on x yielding a and b
> >       return a, b
> >
> >     print "a = %s, b = %s" % (foo(x))
>
> Leave out the parentheses around foo(x):
>
>      print "a = %s, b = %s" % foo(x)
>
>
> David Trudgett
>
>






More information about the Python-list mailing list