inspect.getsource bug?

Ciccio franapoli at gmail.com
Sun Dec 26 17:43:39 EST 2010


On 26 Dic, 19:24, Ciccio <franap... at gmail.com> wrote:
> 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



More information about the Python-list mailing list