<div dir="ltr">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.<div><br></div><div>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.</div><div><br></div><div>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.</div><div><br><div class="gmail_quote"><div dir="ltr">On Thu, 22 Jun 2017 at 08:26 Thomas Güttler <<a href="mailto:guettliml@thomas-guettler.de">guettliml@thomas-guettler.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">thank you! I am happy that Guido is open for  a pull request ... There were +1 votes, too (and some concern about python<br>
startup time).<br>
<br>
<br>
I stopped coding in spare time, since my children are more important at the moment .. if some wants to try it ... go<br>
ahead and implement named tuples for the socket standard library - would be great.<br>
<br>
Just for the records, I came here because of this feature request:<br>
<br>
    <a href="https://github.com/giampaolo/psutil/issues/928" rel="noreferrer" target="_blank">https://github.com/giampaolo/psutil/issues/928</a><br>
<br>
Regards,<br>
   Thomas Güttler<br>
<br>
PS: For some strange reasons I received only some mails of this thread. But I could<br>
find the whole thread in the archive.<br>
<br>
Am 20.06.2017 um 04:05 schrieb INADA Naoki:<br>
> Namedtuple in Python make startup time slow.<br>
> So I'm very conservative to convert tuple to namedtuple in Python.<br>
> INADA Naoki  <<a href="mailto:songofacandy@gmail.com" target="_blank">songofacandy@gmail.com</a>><br>
><br>
><br>
> On Tue, Jun 20, 2017 at 7:27 AM, Victor Stinner<br>
> <<a href="mailto:victor.stinner@gmail.com" target="_blank">victor.stinner@gmail.com</a>> wrote:<br>
>> Oh, about the cost of writing C code, we started to enhance the socket<br>
>> module in socket.py but keep the C code unchanged. I am thinking to the<br>
>> support of enums. Some C functions are wrapped in Python.<br>
>><br>
>> Victor<br>
>><br>
>> Le 19 juin 2017 11:59 PM, "Guido van Rossum" <<a href="mailto:guido@python.org" target="_blank">guido@python.org</a>> a écrit :<br>
>>><br>
>>> There are examples in timemodule.c which went through a similar conversion<br>
>>> from plain tuples to (sort-of) named tuples. I agree that upgrading the<br>
>>> tuples returned by the socket module to named tuples would be nice, but it's<br>
>>> a low priority project. Maybe someone interested can create a PR? (First<br>
>>> open an issue stating that you're interested; point to this email from me to<br>
>>> prevent that some other core dev just closes it again.)<br>
>>><br>
>>> On Mon, Jun 19, 2017 at 2:24 PM, Victor Stinner <<a href="mailto:victor.stinner@gmail.com" target="_blank">victor.stinner@gmail.com</a>><br>
>>> wrote:<br>
>>>><br>
>>>> Hi,<br>
>>>><br>
>>>> 2017-06-13 22:13 GMT+02:00 Thomas Güttler <<a href="mailto:guettliml@thomas-guettler.de" target="_blank">guettliml@thomas-guettler.de</a>>:<br>
>>>>> AFAIK the socket module returns plain tuples in Python3:<br>
>>>>><br>
>>>>>    <a href="https://docs.python.org/3/library/socket.html" rel="noreferrer" target="_blank">https://docs.python.org/3/library/socket.html</a><br>
>>>>><br>
>>>>> Why not use named tuples?<br>
>>>><br>
>>>> For technical reasons: the socket module is mostly implemented in the<br>
>>>> C language, and define a "named tuple" in C requires to implement a<br>
>>>> "sequence" time which requires much more code than creating a tuple.<br>
>>>><br>
>>>> In short, create a tuple is as simple as Py_BuildValue("OO", item1,<br>
>>>> item2).<br>
>>>><br>
>>>> Creating a "sequence" type requires something like 50 lines of code,<br>
>>>> maybe more, I don't know exactly.<br>
>>>><br>
>>>> Victor<br>
>>>> _______________________________________________<br>
>>>> Python-ideas mailing list<br>
>>>> <a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
>>>> <a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
>>>> Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> --Guido van Rossum (<a href="http://python.org/~guido" rel="noreferrer" target="_blank">python.org/~guido</a>)<br>
>><br>
>><br>
>> _______________________________________________<br>
>> Python-ideas mailing list<br>
>> <a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
>> <a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
>> Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
>><br>
> _______________________________________________<br>
> Python-ideas mailing list<br>
> <a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
> Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
><br>
<br>
--<br>
Thomas Guettler <a href="http://www.thomas-guettler.de/" rel="noreferrer" target="_blank">http://www.thomas-guettler.de/</a><br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div></div></div>