These are chat archives for dropbox/pyston

5th
Nov 2015
Sun
@Daetalus
Nov 05 2015 17:29
Hi, I have a question about how to get cls information in a "classmethod" in Pyston. I create a gist for it, hope it could describe it clearly. https://gist.github.com/Daetalus/09441b1d5c2c13c6ded8
Kevin Modzelewski
@kmod
Nov 05 2015 22:27
yeah, we need to add it as some sort of classmethod object
the details are that it will get the class based on the way you obtained it
ie it uses a descriptor to see what object you got it from, and then binds to that
I think we could support this by using PyClassMethod_New(fromkeys_func) instead of boxInstanceMethod()
or we could just use the cpython way :) which is to set up a method with the METH_CLASS flag set