diff --git a/curriculum/challenges/english/blocks/lecture-understanding-object-oriented-programming-and-encapsulation/68c128cbd77e4ba9ed671937.md b/curriculum/challenges/english/blocks/lecture-understanding-object-oriented-programming-and-encapsulation/68c128cbd77e4ba9ed671937.md index f6b216d949b..933c76bafbb 100644 --- a/curriculum/challenges/english/blocks/lecture-understanding-object-oriented-programming-and-encapsulation/68c128cbd77e4ba9ed671937.md +++ b/curriculum/challenges/english/blocks/lecture-understanding-object-oriented-programming-and-encapsulation/68c128cbd77e4ba9ed671937.md @@ -21,7 +21,9 @@ When you use a method, you always have to call it with parentheses. But with a p For example, you might want to calculate a value or check that a new value is valid before saving it. Instead of calling a method for that, you can use an attribute-like way to do that. -To create a property, you define a method and place the `@property` decorator above it. This tells Python to treat the method as a property. +In Python, a decorator is a function that modifies the functionalities of other functions, or classes, without changing their original code. + +While it is possible to create custom decorators, this is beyond the scope of this lesson. Just know that to create a property, you define a method and place the `@property` decorator above it. This turns the method into a property, so it can be accessed like an attribute while internally calling the decorated method. That takes us to getters. Here's how to create one with the `@property` decorator: