simple question

Peter Otten __peter__ at web.de
Sun Sep 5 10:55:44 EDT 2004


Ajay wrote:

> self.logger.error("Illegal date index, "  str(dateIndex))

I think you meant 

self.logger.error("Illegal date index ",  str(dateIndex))

error(fmt, arg1, arg2, ..., argN)

is just a convenient alternative to

error(fmt % (arg1, arg2, ..., argN))

Therefore

self.logger.error("Illegal date index %s", dateIndex)

or

self.logger.error("Illegal date index " + str(dateIndex))

should both work.

Peter






More information about the Python-list mailing list