R
Richard Lamboj
Hello,
what should i take:
- nested functions:
class MyClass(object)
def blah(self):
def blub(var1, var2):
do something...
blub(1, 5)
or
class MyClass(object)
def blah(self):
def _blub(var1, var2):
do something...
_blub(1, 5)
- "private" functions:
class MyClass(object)
def blah(self):
self._blub()
def _blub(self):
do something...
What is more pythonic?
It is just for splitting up long code in classes.
Kind Regards,
Richi
what should i take:
- nested functions:
class MyClass(object)
def blah(self):
def blub(var1, var2):
do something...
blub(1, 5)
or
class MyClass(object)
def blah(self):
def _blub(var1, var2):
do something...
_blub(1, 5)
- "private" functions:
class MyClass(object)
def blah(self):
self._blub()
def _blub(self):
do something...
What is more pythonic?
It is just for splitting up long code in classes.
Kind Regards,
Richi