Peter Hardy wrote:

> They're round braces in the string, not curly ones. And you need the
> format in there as well.
> 
>   str = "Foo : %(foo)s  Bar : %(bar)s  Baz : %(baz)s" % params

Brilliant. Thanks Peter.

> Now. Why is python so easy going that it lets me always specify strings
> there, when the elements of params are clearly integers?

<underwear type="asbestos">
Thats the stupidity of dynamic typing.
</underwear>

Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo
+-----------------------------------------------------------+
"The trouble with Muslims is not that they try to make us
think as they do, but that they try to make us do as they
think!" -- paraphrased from H.L. Mencken on Puritans 
_______________________________________________
coders mailing list
[email protected]
http://lists.slug.org.au/listinfo/coders

Reply via email to