homepage

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 <1389328579.75.0.950165155963.issue20172@psf.upfronthosting.co.za>
In-reply-to
Content
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]*/
(see http://hg.python.org/sandbox/zware/rev/f0662bf33e65)
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.
History
Date User Action Args
2014年01月10日 04:36:19zach.waresetrecipients: + zach.ware, larry
2014年01月10日 04:36:19zach.waresetmessageid: <1389328579.75.0.950165155963.issue20172@psf.upfronthosting.co.za>
2014年01月10日 04:36:19zach.warelinkissue20172 messages
2014年01月10日 04:36:18zach.warecreate

AltStyle によって変換されたページ (->オリジナル) /