'static' class properties in extension types
Tim Goetze
ggrp at quitte.de
Wed Dec 5 07:36:39 EST 2001
More information about the Python-list mailing list
Wed Dec 5 07:36:39 EST 2001
- Previous message (by thread): 'static' class properties in extension types
- Next message (by thread): PLplot with Python 2.1?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ggrp at quitte.de (Tim Goetze) wrote in message news:<e58a1d8d.0112010648.79ee5793 at posting.google.com>... > class C: > const = 1 > > can somebody tell me if, and how I can create the equivalent of > 'C.const' if C is not a Python class, but a type implemented in a C > extension module? no question shall ever remain unanswered: PyType_Ready (my_type) PyDict_SetItemString (my_type->tp_dict, "const", PyInt_FromLong (1)); in case somebody else wonders, too ;)
- Previous message (by thread): 'static' class properties in extension types
- Next message (by thread): PLplot with Python 2.1?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list