On 30/05/2017 16:38, Guido van Rossum wrote:
On Mon, May 29, 2017 at 11:16 PM, Serhiy Storchaka
<storch...@gmail.com <mailto:storch...@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.
It does seem that far enough back, struct member names were all one
space, standing for little more than their offset and type:
"Two structures may share a common initial sequence of members; that is,
the same member may appear in two different structures if it has the
same type in both and if all previous members are the same in both.
(Actually, the compiler checks only that a name in two different
structures has the same type and offset in both, ... )" -- The C
Programming Language, K&R 1978 (p197).
With these Python name spaces, you're really spoiling us, Mr BDFL.
Jeff Allen
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com