forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
area-terminalbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugverification-neededVerification of issue is requestedVerification of issue is requestedverifiedVerification succeededVerification succeeded
Milestone
Description
def my_decorator(func):
def wrapper():
print("Something is happening before the function is called.")
func()
print("Something is happening after the function is called.")
return wrapper
@my_decorator
def say_whee():
print("Whee!")
say_whee()shift+enter or 'run' button in vscode
>>> def my_decorator(func):
... def wrapper():
... print("Something is happening before the function is called.")
... func()
... print("Something is happening after the function is called.")
... return wrapper
... @my_decorator
File "<stdin>", line 7
@my_decorator
^
SyntaxError: invalid syntax
>>>
>>> def say_whee():
... print("Whee!")
...
>>> say_whee()
Whee!
>>>
python extension v2021.1.442908725-dev
francopiccolo, JordyScript, dmitrievskymax, rodionlim, KarolisKont and 6 morepsobolewskiPhD
Metadata
Metadata
Assignees
Labels
area-terminalbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugverification-neededVerification of issue is requestedVerification of issue is requestedverifiedVerification succeededVerification succeeded