A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-August/102765.html below:

[Python-Dev] co_firstlineno on decorated functions

[Python-Dev] co_firstlineno on decorated functions [Python-Dev] co_firstlineno on decorated functionsRaghuram Devarakonda draghuram at gmail.com
Tue Aug 3 17:05:08 CEST 2010
On Tue, Aug 3, 2010 at 10:14 AM, Guido van Rossum <guido at python.org> wrote:

> What are the use cases for co_firstlineno? Even if it is for
> displaying the source code, I can find virtue for both sides of this
> argument.

nose uses co_firstlineno to determine order of the test functions and
decorating a test function can change such order. To keep the
ordering, it provides nose.tools.make_decorator() which explicitly
keeps the line number of the original function. Check the following
thread for a discussion in this regard:

http://groups.google.com/group/nose-users/browse_thread/thread/3e354cbb5b1fac6/107429c5abbf2e59

Thanks,
Raghu
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4