SAGE
Programming Guide
Up:
SAGE Documentation Index
Next:
Front Matter
SAGE
Programming Guide
William Stein and David Joyner
Date:
October 18, 2006
Front Matter
Contents
1. Introduction
2.
SAGE
Coding Conventions
2.1 File and Directory names
2.2 Exceptions
2.3 Documentation Strings
2.3.1 Further conventions for automated testing of examples
2.4 Optional Packages
2.5 Special
SAGE
Methods
2.5.1 Latex Representation
2.5.2 Print Representation
2.5.3 Matrix from Object
2.5.4 Vector from Object
2.6 Headings of SAGE Library Code Files
2.7 The
SAGE
Rules and Conventions for Coercion and Arithmetic
2.8 Mutability
3. Creating a
SAGE
Module or Package
3.1 Randomized Testing
3.2 Creating a New
SAGE
spkg Package
4. Documentation
4.1 Source Code Documentation
4.2 Extra Documentation
4.3 Automated Testing
4.3.1 Testing .py, .pyx and .sage Files
4.3.2 Testing
LaTeX
Documentation
4.4 Modifying the
SAGE
Manuals
5. Writing Optimized Compiled Code With SAGE
5.1 Introduction
5.1.1 Interpreted and Compiled Code
5.1.2 Why Pyrex is the Best Available Option for SAGE
5.2 Getting Going
5.2.1 Attaching or Loading
.spyx
Files
5.2.2 A simple loop example: Sum of squares
5.2.3 Adding to SAGE
5.2.4 Your Own
setup.py
5.3 Pyrex Manual
5.3.1 Public and Private Variables
5.4 Gotchas
5.4.1 How C extension classes different from Python classes
5.4.2 When to use
cdef class
versuses
def class
in Pyrex
5.4.3 SAGE's Pyrex is Patched
5.4.4 There is no +=
5.4.5 Notation for C for Loops
5.4.6 Typos in Function Names and Variables
5.4.7 Doctests
5.4.8 Signal Handling
5.4.9 Introspection
5.5 Automatic Coercion to and From C Data Types
5.6 getslice
5.7 The Python/C API
5.8 C Header Files
5.9 Writing Your Code in a Mix of Pyrex and C/C++
5.10 Splitting Implementations Across Multiple Files
5.11 Wrapping C++ Code
5.12 Other Optimization Tricks
5.13 Misc
5.13.1 Class methods
5.13.2 List Comprehensions
6.
SAGE
Interfaces
6.1 The PARI C-library Interface
6.2 GAP
6.3 Singular
6.4 Another Approach
6.5 Creating a new Pseudo-tty Interface
7. Mercurial: The
SAGE
Source Control System
7.0.1 Quick Mercurial tutorial for SAGE
7.1 Updating To the Latest Official
SAGE
Library Source Code
8. Miscellaneous
8.1 Weird Issues
9. History and License
9.1 License
9.1.1 The GNU General Public License
Index
About this document ...
SAGE
Programming Guide
Up:
SAGE Documentation Index
Next:
Front Matter
Release 1.4.1, documentation updated on October 18, 2006.
See
About this document...
for information on suggesting changes.