I finally figured out how to implement classes in Python using C API — the right way. Namely as a new type using the PyTypeObject complete with get and set attribute calls and plain members. But I tought my previous hack for building a class at runtime is still slim enough to share, especially if you just got a couple of methods that you want bundled into a class instead of a module.
Pages
More of Me
Sections
Topics
- 3D (3)
- Acoustics (2)
- Amazon (1)
- Antarctica (2)
- Anthropology (1)
- API (2)
- Beverage (1)
- Biology (1)
- C++ (3)
- Coding (9)
- Computer (35)
- Cooking (1)
- CSS (6)
- Design (7)
- Economics (1)
- Film (41)
- Graphics (9)
- History (2)
- Humour (16)
- i18n (4)
- Internet (21)
- Javascript (1)
- Jazz (1)
- Language (6)
- Liberty (2)
- Lifestyle (3)
- Linux (1)
- Literature (2)
- Math (3)
- Meme (1)
- Music (7)
- Philosophy (1)
- PHP (2)
- Plugin (5)
- Poetry (2)
- Politics (1)
- Python (5)
- Racing (4)
- Sandbox (3)
- Space (1)
- Television (3)
- Web (21)
- Widget (3)
- WordPress (16)
- Writing (5)
- XHTML (4)
- YouTube (2)
Archive
Blogroll