Zachary Ware added the comment:
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.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20172>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com