]> granicus.if.org Git - python/commit
Make getsourcefile() succeed even if the filename doesn't end in '.py' --
authorKa-Ping Yee <ping@zesty.ca>
Fri, 2 Mar 2001 05:50:34 +0000 (05:50 +0000)
committerKa-Ping Yee <ping@zesty.ca>
Fri, 2 Mar 2001 05:50:34 +0000 (05:50 +0000)
commit4eb0c003f8cd892800aa425fbde02ca9ecc76f34
treea46a1250eb1627879deea0e4779953110bc6a66a
parent9054344d1405cd31ea11e729edac2784dc19b6f2
Make getsourcefile() succeed even if the filename doesn't end in '.py' --
    as long as the filename also doesn't end in a suffix that indicates
    a binary file (according to the flags in imp.get_suffixes()).

Shrink try...except clauses and replace some of them with explicit checks.
Lib/inspect.py