[Python-ideas] be upfront if you aren't willing to implement your own idea (was: socket module: plain stuples vs named tuples - Thank you)

Brett Cannon brett at python.org
Fri Jun 23 19:22:11 EDT 2017


It has been brought to my attention that some people found this email as
sounding rather angry. I was frustrated (and there is more to this specific
issue than what everyone is seeing publicly), but I didn't meant for it to
come off as angry, and for that I apologize.

On Fri, 23 Jun 2017 at 09:49 Brett Cannon <brett at python.org> wrote:

> Everyone, please be upfront when proposing any ideas if you refuse to
> implement your own idea yourself. It's implicit that if you have an idea to
> discuss here that you are serious enough about it to see it happen, so if
> that's not the case then do say so in your first email (obviously if your
> circumstances change during the discussion then that's understandable).
> Otherwise people will spend what little spare time they have helping you
> think through your idea, and then find out that the discussion will more
> than likely end up leading to no change because the most motivated person
> behind the discussion isn't motivated enough to actually enact the change.
>
> And if you lack knowledge in how to implement the idea or a certain area
> of expertise, please be upfront about that as well. We have had instances
> here where ideas have gone as far as PEPs to only find out the OP didn't
> know C which was a critical requirement to implementing the idea, and so
> the idea just fell to the wayside and hasn't gone anywhere. It's totally
> reasonable to ask for help, but once again, please be upfront that you will
> need it to have any chance of seeing your idea come to fruition.
>
> To be perfectly frank, I personally find it misleading to not be told
> upfront that you know you will need help (if you learn later because you
> didn't know e.g. C would be required, that's different, but once you do
> learn then once again be upfront about it). Otherwise I personally feel
> like I was tricked into a discussion under false pretenses that the OP was
> motivated enough to put the effort in to see their idea come to be. Had I
> known to begin with that no one was actually stepping forward to make this
> change happen I would have skipped the thread and spent the time I put in
> following the discussion into something more productive like reviewing a
> pull request.
>
> On Thu, 22 Jun 2017 at 08:26 Thomas Güttler <guettliml at thomas-guettler.de>
> wrote:
>
>> thank you! I am happy that Guido is open for  a pull request ... There
>> were +1 votes, too (and some concern about python
>> startup time).
>>
>>
>> I stopped coding in spare time, since my children are more important at
>> the moment .. if some wants to try it ... go
>> ahead and implement named tuples for the socket standard library - would
>> be great.
>>
>> Just for the records, I came here because of this feature request:
>>
>>     https://github.com/giampaolo/psutil/issues/928
>>
>> Regards,
>>    Thomas Güttler
>>
>> PS: For some strange reasons I received only some mails of this thread.
>> But I could
>> find the whole thread in the archive.
>>
>> Am 20.06.2017 um 04:05 schrieb INADA Naoki:
>> > Namedtuple in Python make startup time slow.
>> > So I'm very conservative to convert tuple to namedtuple in Python.
>> > INADA Naoki  <songofacandy at gmail.com>
>> >
>> >
>> > On Tue, Jun 20, 2017 at 7:27 AM, Victor Stinner
>> > <victor.stinner at gmail.com> wrote:
>> >> Oh, about the cost of writing C code, we started to enhance the socket
>> >> module in socket.py but keep the C code unchanged. I am thinking to the
>> >> support of enums. Some C functions are wrapped in Python.
>> >>
>> >> Victor
>> >>
>> >> Le 19 juin 2017 11:59 PM, "Guido van Rossum" <guido at python.org> a
>> écrit :
>> >>>
>> >>> There are examples in timemodule.c which went through a similar
>> conversion
>> >>> from plain tuples to (sort-of) named tuples. I agree that upgrading
>> the
>> >>> tuples returned by the socket module to named tuples would be nice,
>> but it's
>> >>> a low priority project. Maybe someone interested can create a PR?
>> (First
>> >>> open an issue stating that you're interested; point to this email
>> from me to
>> >>> prevent that some other core dev just closes it again.)
>> >>>
>> >>> On Mon, Jun 19, 2017 at 2:24 PM, Victor Stinner <
>> victor.stinner at gmail.com>
>> >>> wrote:
>> >>>>
>> >>>> Hi,
>> >>>>
>> >>>> 2017-06-13 22:13 GMT+02:00 Thomas Güttler <
>> guettliml at thomas-guettler.de>:
>> >>>>> AFAIK the socket module returns plain tuples in Python3:
>> >>>>>
>> >>>>>    https://docs.python.org/3/library/socket.html
>> >>>>>
>> >>>>> Why not use named tuples?
>> >>>>
>> >>>> For technical reasons: the socket module is mostly implemented in the
>> >>>> C language, and define a "named tuple" in C requires to implement a
>> >>>> "sequence" time which requires much more code than creating a tuple.
>> >>>>
>> >>>> In short, create a tuple is as simple as Py_BuildValue("OO", item1,
>> >>>> item2).
>> >>>>
>> >>>> Creating a "sequence" type requires something like 50 lines of code,
>> >>>> maybe more, I don't know exactly.
>> >>>>
>> >>>> Victor
>> >>>> _______________________________________________
>> >>>> Python-ideas mailing list
>> >>>> Python-ideas at python.org
>> >>>> https://mail.python.org/mailman/listinfo/python-ideas
>> >>>> Code of Conduct: http://python.org/psf/codeofconduct/
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> --Guido van Rossum (python.org/~guido)
>> >>
>> >>
>> >> _______________________________________________
>> >> Python-ideas mailing list
>> >> Python-ideas at python.org
>> >> https://mail.python.org/mailman/listinfo/python-ideas
>> >> Code of Conduct: http://python.org/psf/codeofconduct/
>> >>
>> > _______________________________________________
>> > Python-ideas mailing list
>> > Python-ideas at python.org
>> > https://mail.python.org/mailman/listinfo/python-ideas
>> > Code of Conduct: http://python.org/psf/codeofconduct/
>> >
>
>
>>
>> --
>> Thomas Guettler http://www.thomas-guettler.de/
>> _______________________________________________
>> Python-ideas mailing list
>> Python-ideas at python.org
>> https://mail.python.org/mailman/listinfo/python-ideas
>> Code of Conduct: http://python.org/psf/codeofconduct/
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170623/4b66084a/attachment-0001.html>


More information about the Python-ideas mailing list