Complete Python Mastery course Section 7 lesson 11

Hi, I’d like to get answers to the 2 following questions about the course in subject, Section 7-Classes, lesson n.11- Properties:

  1. with the final version of the code, that use the @property decorator, I still can see the internal variable product.__price in the list, also if hidden by two underscores:

  2. if I comment the @price.setter section, I get an error because the constructor can’t set the value of the price:

This is the version of my VSCode:
Version: 1.74.2 (user setup)
Commit: e8a3071ea4344d9d48ef8a4df2c097372b0c5161
Date: 2022-12-20T10:29:14.590Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
OS: Windows_NT x64 10.0.22621
Sandboxed: No

Thanks in advance for your kind help.

you did it wrong

def __init__(self,price):
    #self.price = price    
    self.__price = price

Yes, you’re right, thanks a lot!