On Aug 12, 1:51 am, James Stroud <nospamjstroudmap...@mbi.ucla.edu> wrote: > andrew cooke wrote: > > 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 > > [...] > > It would be helpful if you were to describe the type of behavior you expect.
Sorry, I didn't make myself clear. When run the code gives NameError: name 'source' is not defined because the class namespace blocks the function namespace (or something...). Andrew -- http://mail.python.org/mailman/listinfo/python-list