5.1 Introduction

This chapter describes how to write Sage programs using Cython, which is a language for writing Python extension modules that is a very slightly variant of Pyrex (we will often refer to it as ``Pyrex'' still).

The primary goal of this chapter is to provide excellent documentation about how to use Cython to write very fast code in the context of Sage. (Currently it is a mess.) This chapter is self contained in that the reader should not have to look at any of the documentation distributed with Pyrex. The reader is urged to at some point read the Python/C API Reference manual.

There is also much to be learned from the Pyrex mailing list:

http://lists.copyleft.no/mailman/listinfo/pyrex.

Acknowledgement: The existence of Greg Ewing's Pyrex is one of the primary reasons Stein chose Python as the implementation language for Sage. It is a brilliantly useful tool.



Subsections
See About this document... for information on suggesting changes.