inspect.getsource bug?

C

Ciccio

Try this:
1) define a function 'foo' in a script
2) runfile the script from a shell
3) do 'inspect.getsource(foo)'
4) change the source of 'foo'
5) runfile the script from the same shell
6) do 3 again

On my 2.6.6 getsource returns twice the same code. I couldn't find
very much about this, is there any known workaround?

thanks
 
C

Ciccio

Try this:
1) define a function 'foo' in a script
2) runfile the script from a shell
3) do 'inspect.getsource(foo)'
4) change the source of 'foo'
5) runfile the script from the same shell
6) do 3 again

On my 2.6.6 getsource returns twice the same code. I couldn't find
very much about this, is there any known workaround?

thanks

found this in the meantime: http://bugs.python.org/issue993580
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top