mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
17 lines
183 B
Python
17 lines
183 B
Python
|
|
class A:
|
|
def __init__(self):
|
|
self._x = 1
|
|
|
|
def _foo(self):
|
|
print(self._x)
|
|
|
|
@property
|
|
def x(self):
|
|
return self._x
|
|
|
|
|
|
a = A()
|
|
a._foo()
|
|
|
|
print(a.x) |