Larry Hastings added the comment: 1) When I wrote that I hadn't considered that people would want custom subclasses of ints. I assumed they'd be using custom converter *functions*, which of course means they'd use 'O&'. I can think of how to reword the text but for now I assume your approach for REGSAM is fine; certainly I approve of using the correct type in the generated code.
However, I doubt doc_default, py_default, and c_default should all be exactly the same. And the 'key_name' parameter seems a little awkward. Here's something you could consider: I don't think it's documented yet (I'm going as fast as I can over here, honest) but now you can use simple constants as Python defaults. So maybe you can use REGSAM like this: arg: REGSAM(c_default='KEY_READ') = winreg.KEY_READ and then REGSAM could simply be an empty ("pass") subclass of int_converter. 2) No convenient way yet. Let me think about it. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20172> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com