On Wednesday 27 May 2015 05:46, Marko Rauhamaa wrote:
> Python's practice works. However, a small problem is presented by nested
> classes:
>
> class Connection:
> def __init__(self):
> class Idle:
> def signal_start(self):
> # how to refer to the outer self
> :
> :
The best solution is not to use nested classes, but if you really must:
class Connection:
def __init__(self):
class Idle:
def signal_start(this):
# this is the Idle instance;
# self is the Connection instance
--
Steve
--
https://mail.python.org/mailman/listinfo/python-list