This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2013年08月09日 18:48 by serhiy.storchaka, last changed 2022年04月11日 14:57 by admin.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 12680 | open | Rune Tynan, 2019年04月04日 01:15 | |
| Messages (9) | |||
|---|---|---|---|
| msg194755 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2013年08月09日 18:48 | |
In declarations of Unicode object C API functions in Doc/c-api/unicode.rst the first Unicode object argument has different names: "unicode", "str", "u", "s". It will be good to unify these names. Of course there is no need to change reasonable argument names for such functions as PyUnicode_Concat() or PyUnicode_CopyCharacters(). |
|||
| msg224600 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2014年08月03日 00:34 | |
@Serhiy will you be proposing a patch for this? |
|||
| msg224609 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年08月03日 06:18 | |
> @Serhiy will you be proposing a patch for this? No, I am not. I have no opinion what name is better. |
|||
| msg231274 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2014年11月17日 08:50 | |
The same issue exists for other types. E.g. PyLong_* functions have Python long argument named as p, obj and pylong, PyFloat_* -- p and pyfloat, PyList_* -- p and list, PyDict_* -- p, a and mapping, PyBytes_* -- o, obj, string and bytes. |
|||
| msg249437 - (view) | Author: Matheus Vieira Portela (matheus.v.portela) * | Date: 2015年08月31日 23:03 | |
Just checking, it would be required to update Objects/unicodeobject.c, Include/unicodeobject.h, and Doc/c-api/unicode.rst, right? As far as I saw, "unicode" means a Python object with unicode string, "u" is a UTF-8 encoded C string, "str" and "s" are encoded C strings (UTF-8, UTF-7, ASCII, Latin-1, among others). Is it alright to rename Python unicode objects to "unicode" and the others to simply "str"? These names are more meaningful than the single character alternatives. The same logic would be applied to the other types, always keeping the longer name rather than the single character ones. |
|||
| msg337589 - (view) | Author: Windson Yang (Windson Yang) * | Date: 2019年03月10日 02:41 | |
I agreed with @Matheus, it would be better than the current implementation |
|||
| msg339088 - (view) | Author: Rune Tynan (Rune Tynan) * | Date: 2019年03月29日 01:16 | |
I have some interest in making a fix for this. From discussion, I'm thinking that, barring names that already have clear meaning (EG, left/right for things with two parameters): - PyObject* that is unknown type remains `obj` - PyObject* with unicode string is `unicode` - const char*, const Py_UNICODE*, and const wchar* becomes `str` - const char, const Py_UNICODE, and const wchar become `ch` Those seem to be the intersect of most common and most descriptive names already seen. |
|||
| msg339420 - (view) | Author: Rune Tynan (Rune Tynan) * | Date: 2019年04月04日 00:53 | |
Another inconsistency I've noticed is that the code sometimes refers to Py_ssize_t instances as a 'length' and sometimes as a 'size'. It seems like 'size' is the more common one in the docs, but the headers more often use 'length'. Which would be the better one to keep for the common case? |
|||
| msg347171 - (view) | Author: Rune Tynan (Rune Tynan) * | Date: 2019年07月02日 23:43 | |
It has been over a month and I'm still waiting for an updated PR review. I understand if people are busy, but don't want this to just fall through the cracks. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:49 | admin | set | github: 62897 |
| 2019年12月09日 16:13:02 | vstinner | set | nosy:
+ vstinner components: + C API |
| 2019年09月11日 13:29:42 | matrixise | set | versions: + Python 3.8, Python 3.9, - Python 3.4, Python 3.5, Python 3.6 |
| 2019年08月08日 23:58:05 | Philip Dye | set | nosy:
+ Philip Dye |
| 2019年07月02日 23:43:09 | Rune Tynan | set | messages: + msg347171 |
| 2019年04月11日 13:20:50 | vstinner | set | nosy:
- vstinner |
| 2019年04月04日 01:15:23 | Rune Tynan | set | keywords:
+ patch stage: needs patch -> patch review pull_requests: + pull_request12607 |
| 2019年04月04日 00:53:24 | Rune Tynan | set | messages: + msg339420 |
| 2019年03月29日 01:16:42 | Rune Tynan | set | messages: + msg339088 |
| 2019年03月27日 01:15:00 | Rune Tynan | set | nosy:
+ Rune Tynan |
| 2019年03月10日 02:41:57 | Windson Yang | set | versions: - Python 2.7 |
| 2019年03月10日 02:41:26 | Windson Yang | set | versions: + Python 2.7, Python 3.4, Python 3.5 |
| 2019年03月10日 02:41:12 | Windson Yang | set | nosy:
+ Windson Yang messages: + msg337589 versions: + Python 3.6, Python 3.7, - Python 2.7, Python 3.4, Python 3.5 |
| 2019年02月24日 22:42:34 | BreamoreBoy | set | nosy:
- BreamoreBoy |
| 2015年08月31日 23:03:57 | matheus.v.portela | set | nosy:
+ matheus.v.portela messages: + msg249437 |
| 2014年11月17日 08:50:52 | serhiy.storchaka | set | messages: + msg231274 |
| 2014年08月03日 06:18:28 | serhiy.storchaka | set | messages: + msg224609 |
| 2014年08月03日 00:34:57 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg224600 versions: + Python 3.5, - Python 3.3 |
| 2013年08月09日 18:48:46 | serhiy.storchaka | create | |