[Python-Dev] Prefixes and namespaces (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Sat Feb 21 21:27:04 CET 2015
- Previous message: [Python-Dev] Prefixes and namespaces
- Next message: [Python-Dev] [Python-checkins] cpython: Issue #23152: Implement _Py_fstat() to support files larger than 2 GB on
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, 21 Feb 2015 21:28:21 +0200 Serhiy Storchaka <storchaka at gmail.com> wrote:
/* Namespaces are one honking great idea -- let's do more of those! */
There are two ways to avoid name conflicts: prefixes and namespaces. Programming languages that lacks namespaces (such as C) need to use prefixes. For example: PROTOCOLSSLv2, PROTOCOLSSLv3, PROTOCOLSSLv23. Python used the same prefixed names when reflect C constants to module level Python globals.
Python still uses the names, and they are still globals. There's no reason to change that. The enum is simply there to improve debugging when printing the values.
Regards
Antoine.
- Previous message: [Python-Dev] Prefixes and namespaces
- Next message: [Python-Dev] [Python-checkins] cpython: Issue #23152: Implement _Py_fstat() to support files larger than 2 GB on
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]