[issue37418] Code execution without calling it

Emilio López Arias report at bugs.python.org
Wed Jun 26 15:07:15 EDT 2019


Emilio López Arias <milio81 at gmail.com> added the comment:

why the code is executed?
I could do a library or a package and include evil code instead of a
print...

El mié., 26 jun. 2019 a las 21:05, SilentGhost (<report at bugs.python.org>)
escribió:

>
> SilentGhost <ghost.adh at runbox.com> added the comment:
>
> It seems you're misunderstanding mechanics of decorators. Decorator is
> called when @decorator statement is executed and in that function *you* are
> calling the wrapped function. There are tutorials available on how to use
> this feature, I'd suggest you try them.
>
> ----------
> nosy: +SilentGhost
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
> type: security -> behavior
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue37418>
> _______________________________________
>

----------

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


More information about the Python-bugs-list mailing list