On Aug 12, 8:52 am, Dave Angel wrote:
> Supply us with just enough source code to actually try it, give the full
> error message including traceback, and tell us what you expected to
> see. Also tell us Python version (sys.version)
>
> So far you've done none of these. When I try the following
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
On Wed, 12 Aug 2009 04:49:06 -0700, andrew cooke wrote:
>> 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 n
andrew cooke wrote:
> On Aug 12, 7:49 am, andrew cooke wrote:
>> On Aug 12, 1:51 am, James Stroud
>> 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):
>>
>> > >
On Aug 12, 7:49 am, andrew cooke wrote:
> On Aug 12, 1:51 am, James Stroud
> 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):
>
>
On Aug 12, 1:51 am, James Stroud
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, jo
James Stroud wrote:
> def stream_factory:
> class Line(object):
> __source = source
> __join = join
> # etc.
> return Line
>
of course I meant "def stream_factory(lines, source, join=''.join):"
James
--
http://mail.python.org/mailman/listinfo/python-list
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
correction: "source" and "join" are undefined. Sorry, Andrew
--
http://mail.python.org/mailman/listinfo/python-list
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
10 matches
Mail list logo