Python equivt of __FILE__ and __LINE__
jeff at schwabcenter.com
Tue Feb 12 19:44:06 CET 2008
Gabriel Genellina wrote:
> En Tue, 12 Feb 2008 16:20:12 -0200, Jeff Schwab <jeff at schwabcenter.com>
>> What about the following? Should the underscores be omitted from the
>> method names, for consistency with inspect?
> I prefer the names_with_underscore, the "current" style recommended by
> PEP8 http://www.python.org/dev/peps/pep-0008/ but hurry up before it
Right on. Won't I feel silly if the inspect.currentmethods() ever get
renamed,for consistency with the PEP?
It still would be nice to have syntax as clean as __FILE__ and __LINE__.
Has anybody already written a module of syntactic sugar around
inspect? These things are mega-useful while debugging, especially for
those of us who prefer in-language libraries to separate debuggers.
More information about the Python-list