Skip to content

Commit fac3996

Browse files
committed
Switched to C++
1 parent f01ac81 commit fac3996

File tree

4 files changed

+389
-300
lines changed

4 files changed

+389
-300
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Python C extension template
1+
# Python C\+\+ extension template
22
## A template for a Python C\-API based extension
3-
**Why** would you want to have a **Python C\-extension** in the first place?
3+
**Why** would you want to have a **Python C\+\+\-extension** in the first place?
44
The answer is quite simple: **Performance**\.
5-
Although you can achieve improved performance using [Cython](http://cython.org/), you can never beat **C level performance**\.
5+
Although you can achieve improved performance using [Cython](http://cython.org/), you can never beat **C/C\+\+ level performance**\.
66

77
## About this template
88
### Introduction
9-
This template provides a very basic Python extension written in C\.
10-
The extension module "*template*" contains a function "*test*" and a class "*example_class*"\.
11-
The "*example_class*" has a single member "*value*" \(of type double => float\), and supports a lot of operations\.
9+
This template provides a very basic Python extension written in C/C\+\+\.
10+
The extension module "*template*" contains a function "*test*" and a class "*example\_class*"\.
11+
The "*example\_class*" has a single member "*value*" \(of type double => float\), and supports a lot of operations\.
1212
It also shows how to import a module \("math\.pi" in this case\)\.
1313

1414
*Work in progress*\.

README.rml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
[title]Python C extension template[/]
1+
[title]Python C++ extension template[/]
22
[subtitle]A template for a Python C-API based extension[/]
3-
[b]Why[/] would you want to have a [b]Python C-extension[/] in the first place?
3+
[b]Why[/] would you want to have a [b]Python C++-extension[/] in the first place?
44
The answer is quite simple: [b]Performance[/].
5-
Although you can achieve improved performance using [url=http://cython.org/]Cython[/], you can never beat [b]C level performance[/].
5+
Although you can achieve improved performance using [url=http://cython.org/]Cython[/], you can never beat [b]C/C++ level performance[/].
66

77
[s1]About this template[/]
88
[s2]Introduction[/]
9-
This template provides a very basic Python extension written in C.
9+
This template provides a very basic Python extension written in C/C++.
1010
The extension module "[i]template[/]" contains a function "[i]test[/]" and a class "[i]example_class[/]".
1111
The "[i]example_class[/]" has a single member "[i]value[/]" (of type double => float), and supports a lot of operations.
1212
It also shows how to import a module ("math.pi" in this case).

README.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11

2-
###########################
3-
Python C extension template
4-
###########################
2+
###############################
3+
Python C\+\+ extension template
4+
###############################
55

66
**********************************************
77
A template for a Python C\-API based extension
88
**********************************************
9-
| **Why** would you want to have a **Python C\-extension** in the first place\?
9+
| **Why** would you want to have a **Python C\+\+\-extension** in the first place\?
1010
| The answer is quite simple\: **Performance**\.
11-
| Although you can achieve improved performance using `Cython <http://cython.org/>`_\, you can never beat **C level performance**\.
11+
| Although you can achieve improved performance using `Cython <http://cython.org/>`_\, you can never beat **C\/C\+\+ level performance**\.
1212
|
1313
1414
About this template
1515
===================
1616

1717
Introduction
1818
------------
19-
| This template provides a very basic Python extension written in C\.
19+
| This template provides a very basic Python extension written in C\/C\+\+\.
2020
| The extension module \"*template*\" contains a function \"*test*\" and a class \"*example\_class*\"\.
2121
| The \"*example\_class*\" has a single member \"*value*\" \(of type double \=\> float\)\, and supports a lot of operations\.
2222
| It also shows how to import a module \(\"math\.pi\" in this case\)\.

0 commit comments

Comments
 (0)