Skip to content
Projets

paulross/PythonExtensionPatterns

Voir sur GitHub

À propos

Examples of safe coding practice for Python C extensions.

Apprentissage et éducation

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
0
in 7 days
+1
in 15 days
0
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

PythonExtensionPatterns

If you need to write C extension for Python then this is the place for you.

The full documentation is on Read the Docs.

Code examples and documentation source are on GitHub. The example and test code is available on PyPi.

Subjects Covered

  • Introduction
  • A Simple Example
  • PyObjects and Reference Counting
  • Containers and Reference Counts
  • Struct Sequence Objects (a namedtuple in C)
  • Exception Raising
  • A Pythonic Coding Pattern for C Functions
  • Parsing Python Arguments
  • Creating New Types
  • Setting and Getting Module Globals
  • Logging and Frames
  • File Paths and Files
  • Subclassing and Using super()
  • Capsules
  • Iterators and Generators
  • Context Managers
  • Pickling C Extension Types
  • Watchers [Python 3.12+]
  • Setting Compiler Flags
  • Debugging
  • Memory Leaks
  • Thread Safety
  • Source Code Layout
  • Using C++ With CPython Code
  • Miscellaneous
  • Installation
  • Further Reading
  • TODO
  • History
  • Index

Project Links

Videos

I have presented some of this, well mostly the chapter "PyObjects and Reference Counting", at Python conferences so if you prefer videos they are here:

Explorer des projets similaires

Chargement…