Author Suzumizaki
Recipients Suzumizaki, amaury.forgeotdarc, brett.cannon, eric.snow, ncoghlan, serhiy.storchaka, vstinner
Date 2014-02-03.00:22:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1391386944.63.0.512123817808.issue20485@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-02-03 00:22:24Suzumizakisetrecipients: + Suzumizaki, brett.cannon, amaury.forgeotdarc, ncoghlan, vstinner, eric.snow, serhiy.storchaka
2014-02-03 00:22:24Suzumizakisetmessageid: <1391386944.63.0.512123817808.issue20485@psf.upfronthosting.co.za>
2014-02-03 00:22:24Suzumizakilinkissue20485 messages
2014-02-03 00:22:24Suzumizakicreate