[Tutor] Help with vars()
Charlie Clark <email@example.com>
Fri, 10 Aug 2001 12:18:33 +0200
>Ehe....I didn't know about the %(foo)[s|d|whatever] format string, all this
> time I was doing things like (for the example above):
> insert = "%s, %s, %s" % (articles['headline'], articles['text'],
> Now, I'm curious, is this a *BAD THING* to do ???
http://starship.python.net/quick-ref1_52.html and search for vars() as it's
not in the standard documentation
I don't think what you do is bad as I had to do it like that myself but it is
a bit clumsy particularly when you have a lot of keys.