[Python-Dev] "Micro-optimisations can speed up CPython"

Guido van Rossum guido at python.org
Tue May 30 11:38:35 EDT 2017
On Mon, May 29, 2017 at 11:16 PM, Serhiy Storchaka <storchaka at gmail.com>
wrote:

> 30.05.17 09:06, Greg Ewing пише:
>
>> Steven D'Aprano wrote:
>>
>>> What does "tp" stand for? Type something, I guess.
>>>
>>
>> I think it's just short for "type". There's an old tradition
>> in C of giving member names a short prefix reminiscent of
>> the type they belong to. Not sure why, maybe someone thought
>> it helped readability.
>>
>
> In early ages of C structures didn't create namespaces, and member names
> were globals.
>

That's nonsense. The reason is greppability.


-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20170530/6e4a232d/attachment.html>


More information about the Python-Dev mailing list