Logged In: YES user_id=1041478 Actually, I'm not sure if this is really a bug, seems to make sense that inspect shouldn't return the new source of the object unless the object has changed.
Logged In: YES user_id=1041478 Not to mention there's intermediate steps where an object's source could change several times, and be reloaded at one of those intermediate steps... seems like there's no way for findsource itself to return the correct source for an object if it's reloaded. Maybe this should be documented...
Logged In: YES user_id=957678 Note that if you tack on execfile(somefile) print inspect.findsource(foo) at the end of the example, so that the object does change, you still see the old source.