[issue20172] Derby #3: Convert 67 sites to Argument Clinic across 4 files (Windows)

Larry Hastings report at bugs.python.org
Fri Jan 10 12:48:48 CET 2014


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 <report at bugs.python.org>
<http://bugs.python.org/issue20172>
_______________________________________


More information about the Python-bugs-list mailing list