This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients control-k, nedbat, serhiy.storchaka
Date 2019-08-29.12:43:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1567082592.98.0.321610736056.issue37971@roundup.psfhosted.org>
In-reply-to
Content
It makes sense. If write decorators as explicit function calls:

decorated = (
    deco1(
        deco2(
            original
        )
    )
)

The line number of decorator itself will be used for CALL_FUNCTION:

  2           0 LOAD_NAME                0 (deco1)

  3           2 LOAD_NAME                1 (deco2)

  4           4 LOAD_NAME                2 (original)

  3           6 CALL_FUNCTION            1

  2           8 CALL_FUNCTION            1

  1          10 STORE_NAME               3 (decorated)
             12 LOAD_CONST               0 (None)
             14 RETURN_VALUE

But I suppose this will add more headache for coverage.py.
History
Date User Action Args
2019-08-29 12:43:13serhiy.storchakasetrecipients: + serhiy.storchaka, nedbat, control-k
2019-08-29 12:43:12serhiy.storchakasetmessageid: <1567082592.98.0.321610736056.issue37971@roundup.psfhosted.org>
2019-08-29 12:43:12serhiy.storchakalinkissue37971 messages
2019-08-29 12:43:12serhiy.storchakacreate