[Python-Dev] Identifier API (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Thu Oct 13 15:23:23 CEST 2011
- Previous message: [Python-Dev] Identifier API
- Next message: [Python-Dev] Identifier API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 13 Oct 2011 14:00:38 +0200 "Martin v. Löwis" <martin at v.loewis.de> wrote:
> I like this better too because of the all-caps macro name. Something about > seeing "Pyidentifier" look like a function call and having it add the magical > PyIdupdate local bugs me. It just looks wrong, whereas the all-caps is more > of a cultural clue that something else is going on.
If people think the macro should be all upper-case, I can go through and replace them (but only once). Let me know what the exact spelling should be.
Py_CONST_STRING or Py_IDENTIFIER would be fine with me. Given that everything else uses "Id" in their name, Py_IDENTIFIER is probably better?
Originally, I meant to make the variable name equal the string (e.g. then having a variable named init point to the "init" string). However, I quickly gave up on that idea, since the strings conflict too often with other identifiers in C. In particular, you couldn't use that approach for calling the "fileno", "read" or "write" methods.
So I think it needs a prefix. If you don't like PyId, let me know what the prefix should be instead.
I agree with that.
Regards
Antoine.
- Previous message: [Python-Dev] Identifier API
- Next message: [Python-Dev] Identifier API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]