Bugs item #993580, was opened at 2004-07-19 00:45 Message generated for change (Comment added) made by jlcherry You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=993580&group_id=5470
Category: Python Library Group: Python 2.3 Status: Open Resolution: None Priority: 5 Submitted By: Jason Mobarak (jmobarak) Assigned to: Nobody/Anonymous (nobody) Summary: inspect.findsource does not call linecache.checkcache Initial Comment: inspect.findsource does not call linecache.checkcache thus always returns orignal source of an object regardless of wether it has changed. ---------------------------------------------------------------------- Comment By: Josh Cherry (jlcherry) Date: 2005-03-20 10:20 Message: 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. ---------------------------------------------------------------------- Comment By: Jason Mobarak (jmobarak) Date: 2004-07-19 01:01 Message: 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... ---------------------------------------------------------------------- Comment By: Jason Mobarak (jmobarak) Date: 2004-07-19 00:53 Message: 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. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=993580&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com