[Python-Dev] PEP 471 (scandir): Poll to choose the implementation (full C or C+Python)
Steve Dower
Steve.Dower at microsoft.com
Fri Feb 13 15:36:28 CET 2015
I think posixmodule is a great candidate for splitting up by platform rather than function, as the whole file is packed with ifdef. It's really only lacking a volunteer to do it, but we could start here (ie. make posixmodule_nt.c for the Windows impl, etc.) and progressively move function implementations out over time? All the module setup and probably most of the Python layer can stay where it is.
More likely we're going to get bogged down discussing it again though, so if that happens my vote is to just make posixmodule.c 800 lines longer.
Cheers,
Steve
Top-posted from my Windows Phone
________________________________
From: Antoine Pitrou<mailto:solipsis at pitrou.net>
Sent: 2/13/2015 5:44
To: python-dev at python.org<mailto:python-dev at python.org>
Subject: Re: [Python-Dev] PEP 471 (scandir): Poll to choose the implementation (full C or C+Python)
On Fri, 13 Feb 2015 08:35:00 -0500
Ben Hoyt <benhoyt at gmail.com> wrote:
>
> If we go ahead with the all C approach, I'd be in favour of
> refactoring a little and putting the new scandir code into a separate
> C file. There are two ways to do this: a) sticking with a single
> Python module and just referencing the non-static functions in
> scandir.c from posixmodule.c, or b) sharing some functions but making
> _scandir.c its own importable module. Option (a) is somewhat simpler
> as there's not module setup stuff twice, but I don't know if there's a
> precedent for that way of doing things.
The _io module already does things that way (the (a) option, I mean).
Regards
Antoine.
_______________________________________________
Python-Dev mailing list
Python-Dev at python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: https://mail.python.org/mailman/options/python-dev/steve.dower%40microsoft.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150213/98cefc9b/attachment.html>
More information about the Python-Dev
mailing list