From 8190dd2cecd8ea2468ba9d41019f0a36a336ff5c Mon Sep 17 00:00:00 2001 From: Zeina Obeid Date: Mon, 22 Dec 2025 12:09:51 +0200 Subject: [PATCH] fix(curriculum): removed decorators section from python review (#64800) --- .../67f39b40deaec81a3e40e0c5.md | 21 ------------------- .../review-python/67f39e391c9b373069def02c.md | 21 ------------------- 2 files changed, 42 deletions(-) diff --git a/curriculum/challenges/english/blocks/review-python-basics/67f39b40deaec81a3e40e0c5.md b/curriculum/challenges/english/blocks/review-python-basics/67f39b40deaec81a3e40e0c5.md index f57ca13f31d..896d4ee95eb 100644 --- a/curriculum/challenges/english/blocks/review-python-basics/67f39b40deaec81a3e40e0c5.md +++ b/curriculum/challenges/english/blocks/review-python-basics/67f39b40deaec81a3e40e0c5.md @@ -626,27 +626,6 @@ print(int(True)) # 1 print(int(False)) # 0 ``` -## Decorators - -- **Definition**: Decorators are a special kind of function in Python. They are like wrappers for other functions, so they take another function as an argument. - -```py -def say_hello(): - name = input('What is your name? ') - return 'Hello ' + name - -def uppercase_decorator(func): - def wrapper(): - original_func = func() - modified_func = original_func.upper() - return modified_func - return wrapper - -say_hello_res = uppercase_decorator(say_hello) - -print(say_hello_res()) -``` - ## Scope in Python - **Local Scope**: This is when a variable declared inside a function or class can only be accessed within that function or class. diff --git a/curriculum/challenges/english/blocks/review-python/67f39e391c9b373069def02c.md b/curriculum/challenges/english/blocks/review-python/67f39e391c9b373069def02c.md index 41f99d6e089..8dd07a89272 100644 --- a/curriculum/challenges/english/blocks/review-python/67f39e391c9b373069def02c.md +++ b/curriculum/challenges/english/blocks/review-python/67f39e391c9b373069def02c.md @@ -626,27 +626,6 @@ print(int(True)) # 1 print(int(False)) # 0 ``` -## Decorators - -- **Definition**: Decorators are a special kind of function in Python. They are like wrappers for other functions, so they take another function as an argument. - -```py -def say_hello(): - name = input('What is your name? ') - return 'Hello ' + name - -def uppercase_decorator(func): - def wrapper(): - original_func = func() - modified_func = original_func.upper() - return modified_func - return wrapper - -say_hello_res = uppercase_decorator(say_hello) - -print(say_hello_res()) -``` - ## Scope in Python - **Local Scope**: This is when a variable declared inside a function or class can only be accessed within that function or class.