On Mon, Jan 14, 2013 at 9:51 PM, Rodrick Brown wrote:
> import sys
>
> PY3K = sys.version_info >= (3,)
>
>
> methods = set([
> "__iter__",
> "__len__",
> "__contains__",
>
> "__lt__",
> "__le__",
> "__eq__",
> "__ne__",
> "__gt__",
> "__ge__",
>
> "__add__",
On Mon, Jan 14, 2013 at 11:38 PM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
> On Mon, 14 Jan 2013 23:00:16 -0500, Rodrick Brown wrote:
>
> > Can someone explain what's going on here.
> >
> > def _build_magic_dispatcher(method):
> > def inner(self, *args, **kwargs):
> >
On 1/14/2013 11:00 PM, Rodrick Brown wrote:
Can someone explain what's going on here.
def _build_magic_dispatcher(method):
def inner(self, *args, **kwargs):
return self.__dict__[method](*args, **kwargs)
inner.__name__ = method
return inner
Nothing, until you run that wi
On Mon, 14 Jan 2013 23:00:16 -0500, Rodrick Brown wrote:
> Can someone explain what's going on here.
>
> def _build_magic_dispatcher(method):
> def inner(self, *args, **kwargs):
> return self.__dict__[method](*args, **kwargs)
> inner.__name__ = method
> return inner
>
> Thank
Can someone explain what's going on here.
def _build_magic_dispatcher(method):
def inner(self, *args, **kwargs):
return self.__dict__[method](*args, **kwargs)
inner.__name__ = method
return inner
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
On May 17, 2007, at 4:12 AM, Robert Rawlins - Think Blue wrote:
I’m currently working on a non-python project, and I’m trying to
overcome a task of parsing a text file into a database and/or xml
file. I’ve managed to find a parser example written in python, and
I’m hoping to deconstruct the
On 5/17/07, Robert Rawlins - Think Blue <[EMAIL PROTECTED]>
wrote:
Hello Guys,
I'm currently working on a non-python project, and I'm trying to overcome
a task of parsing a text file into a database and/or xml file. I've managed
to find a parser example written in python, and I'm hoping to d
Hello Guys,
I'm currently working on a non-python project, and I'm trying to overcome a
task of parsing a text file into a database and/or xml file. I've managed to
find a parser example written in python, and I'm hoping to deconstruct the
code methodology a bit so I can write it in another lan