ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-Tutor
python-Tutor
Re: [Tutor] Help with vars()
by Charlie Clark other posts by this author
Aug 10 2001 10:18AM messages near this date
Re: [Tutor] Help with vars() | Re: [Tutor] Help with vars()
> 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'], 
> articles['sternzeichen'])
> 
>  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.

Charlie


_______________________________________________
Tutor maillist  -  Tutor@[...].org
http://mail.python.org/mailman/listinfo/tutor
Thread:
Charlie Clark
Danny Yoo
Steven Burr
Charlie Clark
Steven Burr
Charlie Clark
lonetwin
Charlie Clark
Steven Burr

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved