New submission from Emilio López Arias <mili...@gmail.com>:

Create a new python file: example.py
------------------------------------
def my_decorator(f):
        print("before")
        f()
        print("after")


@my_decorator
def my_function():
        print("hello world")
------------------------------------

If you execute the file example.py you should see some output you shouldn't:
(base) C:\Users\emilio\curso_python>python --version
Python 3.7.3
(base) C:\Users\emilio\curso_python>python ejemplo.py
before
hello world
after

----------
messages: 346661
nosy: Emilio López Arias
priority: normal
severity: normal
status: open
title: Code execution without calling it
type: security
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37418>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to