[Python-Dev] lament for the demise of unbound methods
Nick Coghlan
ncoghlan at gmail.com
Sun Jul 7 00:18:52 CEST 2013
On 6 Jul 2013 22:52, "Michael Foord" <fuzzyman at voidspace.org.uk> wrote:
>
>
> On 5 Jul 2013, at 12:26, Łukasz Langa <lukasz at langa.pl> wrote:
>
> > On 5 lip 2013, at 12:07, Martin v. Löwis <martin at v.loewis.de> wrote:
> >
> >> I wonder why you need to figure out the signatures in advance.
> >> Can you just wait until the function is actually used, and then
> >> process the parameters as you get them?
> >>
> >
> > My guess is that Michael's design lets mock objects be introspected as
well, i.e. they don't appear as magical as they really are to the user code.
> >
>
> This is also true. Doing it up front has some conveniences - for example
dir(...) works correctly.
Doesn't this really mean that in Py3, introspection APIs need a class *and*
an instance of that class for robust analysis of expected descriptor
results? (which was technically always true, the removal of unbound methods
just makes it significantly more important to handle descriptors with no
special behaviour on the class side of things).
And yes, I'm aware that idea poses a significant challenge for correct
handling of ABCs :P
Cheers,
Nick.
>
> Michael
>
> > --
> > Best regards,
> > Łukasz Langa
> >
> > WWW: http://lukasz.langa.pl/
> > Twitter: @llanga
> > IRC: ambv on #python-dev
> >
>
>
> --
> http://www.voidspace.org.uk/
>
>
> May you do good and not evil
> May you find forgiveness for yourself and forgive others
> May you share freely, never taking more than you give.
> -- the sqlite blessing
> http://www.sqlite.org/different.html
>
>
>
>
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
http://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20130707/f8c1c0cd/attachment.html>
More information about the Python-Dev
mailing list