Re: [Python-ideas] Restore the __members__ behavior to python3 for C extension writers

2017-06-15 Thread Spencer Brown
Maybe it would make sense to implement a C-API function to perform a super() lookup, without all the contortions needed currently. It seems wasteful to have to make a super object, use it then immediately discard all the time. However the current logic is entangled into the type a fair bit, so t

Re: [Python-ideas] Restore the __members__ behavior to python3 for C extension writers

2017-06-15 Thread Nathaniel Smith
On Thu, Jun 15, 2017 at 2:44 PM, Barry Scott wrote: > > On 15 Jun 2017, at 04:45, Nick Coghlan wrote: >>dir_result = PyObject_CallMethod(base_type, "__dir__", "O", self); >>/* Add any additional attributes to the dir_result list */ >>return dir_result; > > > But I need the result of _

Re: [Python-ideas] Restore the __members__ behavior to python3 for C extension writers

2017-06-15 Thread Barry Scott
> On 15 Jun 2017, at 04:45, Nick Coghlan wrote: > > On 15 June 2017 at 11:06, Nathaniel Smith > wrote: >> On Wed, Jun 14, 2017 at 1:54 PM, Barry Scott wrote: On 13 Jun 2017, at 23:49, Chris Angelico wrote: For that purpose, is it possible to use super().__dir_