Hi Jeroen, Not posting on python-ideas for now since this is a more 1-on-1 message and I don't want to add to the noise there.
I've read your PEP a few times now, and some of the discussion on Python-ideas, and I think it all pretty much makes sense to me. The one thing I keep questioning is whether it makes sense to include the descriptor functionality (i.e. __get__) on the basefunction class. It seems a bit strange t to me because it's a bit of tacked-on functionality that isn't even necessarily needed by "functions" (although we do want most functions to behave as unbound methods). Further, it breaks backwards-compatibility for builtin_function. I think it's a *good* breakage because there's currently no good reason they should behave differently from Python functions in this regard. But it makes me wonder if there isn't a case for preserving that backwards compatibility where necessary, while still introducing yet another class that's like a built-in function with __get__. I also don't like that basefunction is spelled without an underscore (no doubt inspired by basestring), but its subclasses (generic_function, etc.) are spelled with an underscore. That's just a minor nitpick. Let me know if you want any help with the prototype implementation. Not that I think you need help, but if you think there's some sensible way to divvy up the work I'm happy to take part. Perhaps we can work on that at Cernay if you haven't already started. On Sat, Mar 31, 2018 at 5:32 PM, Jeroen Demeyer <j.deme...@ugent.be> wrote: > I have drafted a Python Enhancement Proposal (PEP) to unify built-in and > Python functions: > > https://github.com/jdemeyer/PEP-functions > > This is just a draft for now, it has not officially been submitted (so there > is no PEP number yet). Cython could benefit from this because Cython > functions would be considered proper functions by Python. For Sage, we could > finally get rid of all the inspect hacks. This would in particular affect > sage.misc.sageinspect and docbuilding. Needless to say, this is a long-term > plan: if all goes well, the PEP would be accepted for Python 3.8. > > For discussion of the PEP itself, please post on the python-ideas thread > https://mail.python.org/pipermail/python-ideas/2018-March/049563.html > > > Happy Easter, > Jeroen. > > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-devel+unsubscr...@googlegroups.com. > To post to this group, send email to firstname.lastname@example.org. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to email@example.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.