[New-bugs-announce] [issue34125] Profiling depends on whether **kwargs is given

Jeroen Demeyer report at bugs.python.org
Mon Jul 16 13:16:00 EDT 2018


New submission from Jeroen Demeyer <J.Demeyer at UGent.be>:

Enable profiling for C functions:

    >>> def prof(frame, typ, arg):
    ...     if typ.startswith("c_"):
    ...         print(arg, typ)
    >>> import sys; sys.setprofile(prof)

and notice how profiling depends on **kwargs:

    >>> list.append([], None)
    <built-in method append of list object at 0x7f52da2a2dd0> c_call
    <built-in method append of list object at 0x7f52da2a2dd0> c_return
    
    >>> list.append([], None, **{})

There is no specification of what should be profiled and what not, so it's not clear what is the "correct" behavior. For the record: in Python 3.6, neither of these were profiled.

----------
components: Interpreter Core
messages: 321746
nosy: jdemeyer
priority: normal
severity: normal
status: open
title: Profiling depends on whether **kwargs is given
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34125>
_______________________________________


More information about the New-bugs-announce mailing list