[BangPypers] Python place holder doubt

kausikram krishnasayee kausikram at gmail.com
Thu Nov 12 10:00:10 CET 2009


>
> url=self.BASEURL
> final=+ "pmid=%d" + "&tag=ntag&type=ge" %d
> urlparse.urljoin(url,final)


Final will raise an error.  Concatination and Formatting cannot be done
together.
final should either be
final = "pmid=%d" %(d,) + "&tag=ntag&type=ge"

or final=("pmid=%d" + "&tag=ntag&type=ge") %(d,)
-- 
Kausikram Krishnasayee
Company: http://silverstripesoftware.com | Webpage: kausikram.net | Blog:
chaosbudha.blogspot.com | Twitter: http://twitter.com/kausikram | Email:
kausikram at gmail.com | Mobile: +91 9884246490


More information about the BangPypers mailing list