hotshot example code doesn't work

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

hotshot example code doesn't work

Brian Cole
Hello All,

I hope this is the appropriate place to post about a python
documentation bug. The hotshot example code is slightly wrong:
http://docs.python.org/lib/hotshot-example.html

This peice of code will not work (anymore?):
benchtime, stones = prof.runcall(test.pystone.pystones)

It will raise this error:
TypeError: unpack non-sequence

The documentation for "runcall" says that the return is the return
from the function. Not a two item tuple.


I also noticed while subscribing to this list that the entire
subscriber list is open to the public:
http://mail.python.org/mailman/roster/doc-sig

Can you disable this please? Otherwise I will need to unsubscribe shortly.

Thanks,
Brian Cole
_______________________________________________
Doc-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/doc-sig
Reply | Threaded
Open this post in threaded view
|

Re: hotshot example code doesn't work

Mark Sapiro
Brian Cole wrote:
>
>I hope this is the appropriate place to post about a python
>documentation bug. The hotshot example code is slightly wrong:
>http://docs.python.org/lib/hotshot-example.html
>
>This peice of code will not work (anymore?):


It works for me in python 2.4.3.


>benchtime, stones = prof.runcall(test.pystone.pystones)
>
>It will raise this error:
>TypeError: unpack non-sequence
>
>The documentation for "runcall" says that the return is the return
>from the function. Not a two item tuple.


That's right, but the return from test.pystone.pystones() is a 2-tuple.


>I also noticed while subscribing to this list that the entire
>subscriber list is open to the public:
>http://mail.python.org/mailman/roster/doc-sig
>
>Can you disable this please? Otherwise I will need to unsubscribe shortly.


If it was open, it's been fixed. Currently it's only available to the
list admin.

--
Mark Sapiro <[hidden email]>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

_______________________________________________
Doc-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/doc-sig