On Thu, Jun 15, 2017 at 2:44 PM, Barry Scott <ba...@barrys-emacs.org> wrote:
>
> On 15 Jun 2017, at 04:45, Nick Coghlan <ncogh...@gmail.com> 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 __dir__ for my object not its base.

Yes, that's what that code should give you. Try it :-)

-n

-- 
Nathaniel J. Smith -- https://vorpus.org
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to