unbit/uwsgi — pull request #318 by anaconda (2013-06-16 00:48:58+00:00)
Title: Make uwsgi.log() accept an object (like print)

Like print(), accept a string or an object and log its __str__ or
__repr__ method output. When debugging I use it like print(), but it's
not... and forget to str() things.

The method definition was also changed from METH_VARARGS (it doesn't
actually accept more than one argument) to METH_O, which makes sure you
only get one argument. When calling PyArg_ParseTuple with the "O" flag
(objects) you can actually get more than one argument, so METH_O does
the hard work for us.

See http://docs.python.org/3.3/c-api/structures.html#METH_O