This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zach.ware
Recipients larry, zach.ware
Date 2014-01-10.04:36:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Thanks, Larry.  Conversion proceeds apace in winreg.c, but I have a couple questions.

1) Since the comment above CConverter.format_unit says all custom converters should use 'O&' instead of defining format_unit, there must be another way to do this:

/*[python input]
class REGSAM_converter(CConverter):
    type = 'REGSAM'
    format_unit = 'i'
    default = 0

    def converter_init(self, *, key_name=""):
        if key_name == "":
            raise ValueError('must provide the key name')
        self.doc_default = self.py_default = self.c_default = key_name
[python start generated code]*/


I don't know what the 'other way' is though :).  The above works, but I don't understand it completely and thus don't like it.  Also, it causes help(winreg.CreateKeyEx) to show "access='KEY_WRITE'" in the signature, when it should have no quotes (being a name).

2) Is there an easy way to give a function multiple names?  OpenKey and OpenKeyEx are the same function, OpenKeyEx has been just defined by an extra methoddef pointing at OpenKey; for now I've just modified that line to make things work.

Neither of these is blocking progress, so not a huge deal other than getting a little bit of review done early.
Date User Action Args
2014-01-10 04:36:19zach.waresetrecipients: + zach.ware, larry
2014-01-10 04:36:19zach.waresetmessageid: <>
2014-01-10 04:36:19zach.warelinkissue20172 messages
2014-01-10 04:36:18zach.warecreate