added convert method to property intention

This commit is contained in:
Ekaterina Tuzova
2013-04-25 13:04:13 +04:00
parent 8a60a263d3
commit 3d49b6001e
10 changed files with 233 additions and 0 deletions
@@ -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