Some people still don’t know that following will work.
class SomeClass(object):
def __init__(self, some_string):
self.final_string = self.second_method(self.first_method(some_string))
def first_method(self, string):
return string
def second_method(self, string):
return string
If you’ll execute following (in addition), you’ll see it works (self.final_string
contains a string):
>>> test = SomeClass('Hello, World')
>>> print test.final_string
Hello, World
This blog is about things I encounter while doing web and non-web software development.