>>600
PyModule_AddIntConstant も結局は辞書とgeneric getattrでやってることなので、
手短にするならgetattrに定数を返す関数を登録するのがいいんじゃない?

SWIGではどうやってたんだろうと思い、気になって調べてみると、SWIGのdocumentでも
Static class members present a special problem for Python. Prior to Python-2.2,
Python classes had no support for static methods and
no version of Python supports static member variables in a manner that SWIG can utilize.
Therefore, SWIG generates wrappers that try to work around some of these issues