[docs] [issue18033] Example for Profile Module shows incorrect method

Ezio Melotti report at bugs.python.org
Sat Jun 8 22:26:52 CEST 2013

Ezio Melotti added the comment:

Thanks for the patches, however the Python 2 example doesn't work.
I think a BytesIO should be used instead of a StringIO, and print_stats() only returns a pstats.Stats instance, without actually printing any result.
I wonder if print_results was an old method that has been removed and if now there's another way to print the results.
I haven't tried on Python 3 yet, but the same comment might apply there too.

stage: needs patch -> patch review
versions: +Python 3.3

Python tracker <report at bugs.python.org>

More information about the docs mailing list