Suzumizaki added the comment: Thank you for reply.
The hack msg209998 is interesting, but how to name submodule with non latin like languages, especially keeping native reable? X( The reason I don't use like "name.encode('unicode-escape').replace(b'\\', b'_')" is the length limits of the identifiers. In fact, Visual C++ can accept 2047 chars(bytes) and gcc have no logical limits. But the PEP 7 says we should use C89. And even C99 assumes first 63 bytes are significant. I don't know what C89 says, And my C99 reference is below, this means real-C99 is possibly different: http://www.open-std.org/JTC1/SC22/wg14/www/docs/n1124.pdf If we should keep C99 order above, 63 chars are too short to use 'unicode-escape' like. 'PyInit_' takes 7, remains 56. When each characters encoded as 5 chars like '_3010', only we can use 11 unicode-codepoints. When 6 chars, only 9 chars. a) If we can break C99 or real-C89/C99 don't have 63 chars rule, we can simply use as Amaury Forgeot d'Arc says. b) If we should keep 63 chars rules, the encodings longer than 'szm62' is not acceptable. c) Of course, when there is no reason to make entry point 'PyInit_modulename', Make enable stable constant name 'PyInit' or 'PyInitUnicodeNamedModule' without individual module name is another acceptable idea. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20485> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com