A
andrew cooke
Is there a way to make this work (currently scope and join are
undefined at runtime when the inner class attributes are defined):
class _StreamFactory(object):
@staticmethod
def __call__(lines, source, join=''.join):
class Line(object):
__source = source
__join = join
[...]
I can get something working by bouncing through global values, but it
looks awful and I think it's a source of a bug due too values being
redefined.
Thanks,
Andrew
undefined at runtime when the inner class attributes are defined):
class _StreamFactory(object):
@staticmethod
def __call__(lines, source, join=''.join):
class Line(object):
__source = source
__join = join
[...]
I can get something working by bouncing through global values, but it
looks awful and I think it's a source of a bug due too values being
redefined.
Thanks,
Andrew