mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
added convert method to property intention
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
class MyClass(object):
|
||||
"""
|
||||
My class to show intention.
|
||||
"""
|
||||
def __init__(self):
|
||||
self._x = None
|
||||
|
||||
def x<caret>(self):
|
||||
print self._x
|
||||
|
||||
|
||||
x = MyClass().x()
|
||||
@@ -0,0 +1,13 @@
|
||||
class MyClass(object):
|
||||
"""
|
||||
My class to show intention.
|
||||
"""
|
||||
def __init__(self):
|
||||
self._x = None
|
||||
|
||||
def x<caret>(self, y):
|
||||
print y
|
||||
return self._x
|
||||
|
||||
|
||||
x = MyClass().x()
|
||||
@@ -0,0 +1,13 @@
|
||||
class MyClass(object):
|
||||
"""
|
||||
My class to show intention.
|
||||
"""
|
||||
def __init__(self):
|
||||
self._x = None
|
||||
|
||||
@property
|
||||
def x<caret>(self):
|
||||
return self._x
|
||||
|
||||
|
||||
x = MyClass().x()
|
||||
@@ -0,0 +1,12 @@
|
||||
class MyClass(object):
|
||||
"""
|
||||
My class to show intention.
|
||||
"""
|
||||
def __init__(self):
|
||||
self._x = None
|
||||
|
||||
def x<caret>(self):
|
||||
return self._x
|
||||
|
||||
|
||||
x = MyClass().x()
|
||||
@@ -0,0 +1,13 @@
|
||||
class MyClass(object):
|
||||
"""
|
||||
My class to show intention.
|
||||
"""
|
||||
def __init__(self):
|
||||
self._x = None
|
||||
|
||||
@property
|
||||
def x(self):
|
||||
return self._x
|
||||
|
||||
|
||||
x = MyClass().x
|
||||
Reference in New Issue
Block a user