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. K
Ka-Ping Yee committed
4eb0c003f8cd892800aa425fbde02ca9ecc76f34
Parent: 9054344