Anyone have a Universal setter example?
Hello Gang, I am fresh to this list so, hello PYC gurus! ------------------------------------------------------------------------------ I have been getting into the Python C API over the past few days and found it it to be a wonderful framework with a solid design. There are many questions I would like to pose and answer in this community and look forward to a productive relationship. Here are a few question I have: 1. Is it appropriate to post usage questions regarding the Python C API to this list like the questions below? 2. Is there any examples of a universal setter function for `PyGetSetDef`? The docs mention using the closure pointer from the last element in the `PyGetSetDef` structures. I am finding it hard to get a grasp on how this is implemented. I understand why we use it and what it does and need a more modular setter function for a large object. *From the docs* [http://docs.python.org/extending/newtypes.html]
`The getter function is passed a Noddy object and a “closure”, which is void pointer. In this case, the closure is ignored. (The closure supports an advanced usage in which definition data is passed to the getter and setter. This could, for example, be used to allow a single set of getter and setter functions that decide the attribute to get or set based on data in the closure.)`
3. Is it customary to use header files when building larger Python modules/objects? I was successful in prototyping the source files, but unable to get the module working after running a distutils install. In short, is it encouraged to use header files? -- Bust0ut, Surgemcgee: Systems Engineer --- surgemcgee.com Django_Teamplate3d
Hello.
Let me remind you this mailing list is to work on developing Python
(adding new features to Python itself and fixing bugs); if you're having
problems using Python, please find another forum. Probably
python-list/comp.lang.python mailing list/news group is the best place;
there are Python developers who participate in it; you may get a faster,
and probably more complete, answer there. See
http://www.python.org/community/ for other lists/news groups/fora. Thank
you for understanding.
On Fri, Oct 26, 2012 at 05:01:09PM -0400, Robert Steckroth
1. Is it appropriate to post usage questions regarding the Python C API to this list like the questions below?
I think not until you ask a question in python-list/comp.lang.python and don't get any reply. Oleg. -- Oleg Broytman http://phdru.name/ phd@phdru.name Programmers don't die, they just GOSUB without RETURN.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 10/26/2012 05:01 PM, Robert Steckroth wrote:
1. Is it appropriate to post usage questions regarding the Python C API to this list like the questions below?
The C-API SIG would likely be a better forum: cap-sig@python.org gmane: gmane.comp.python.capi Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlCLA2oACgkQ+gerLs4ltQ6JnACg004jmBpUDRX1TBHaFNkg7JW0 7twAoI/s228R0TnaBpqiImJsjGg1hJKp =IAPl -----END PGP SIGNATURE-----
participants (3)
-
Oleg Broytman
-
Robert Steckroth
-
Tres Seaver