Run ❯
Get your
own Python
server
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
class Person: def __init__(self, name, age): self.name = name self.__age = age # Private property p1 = Person("Emil", 25) print(p1.name) print(p1.__age) # This will cause an error
Emil
Traceback (most recent call last):
File "./prog.py", line 8, in <module>
AttributeError: 'Person' object has no attribute '__age'