Skip to content

Commit 52d9e5e

Browse files
committed
remove trailing whitespace
1 parent f5d49f5 commit 52d9e5e

File tree

138 files changed

+3044
-3044
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+3044
-3044
lines changed

README.md

+32-32
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
[![build-status-badge]][build-status]
2-
[![docs-badge]][docs]
3-
[![pypi-version]][pypi]
4-
[![license-badge]][license]
5-
6-
# PyD
7-
8-
PyD provides seamless interoperability between Python and the D programming language.
9-
10-
# Requirements
11-
12-
## Python
13-
14-
CPython 2.6+
15-
16-
## D Compilers
17-
18-
* DMD, LDC fe2.065+
19-
* GDC fe2.065+, embedding only (GDC still doesn't have shared library support!)
20-
21-
Note all D compilers are based on DMD's front end, so while LDC and GDC have
22-
their own verisoning schemes, I only pay attention to the front end version.
23-
24-
25-
[build-status-badge]: https://travis-ci.org/ariovistus/pyd.svg?branch=master
26-
[build-status]: https://travis-ci.org/ariovistus/pyd
27-
[docs-badge]: https://readthedocs.org/projects/pyd/badge/
28-
[docs]: http://pyd.readthedocs.org/
29-
[pypi-version]: https://pypip.in/version/pyd/badge.svg
30-
[pypi]: https://pypi.python.org/pypi/pyd
31-
[license-badge]: https://pypip.in/license/pyd/badge.svg
32-
[license]: https://pypi.python.org/pypi/pyd/
1+
[![build-status-badge]][build-status]
2+
[![docs-badge]][docs]
3+
[![pypi-version]][pypi]
4+
[![license-badge]][license]
5+
6+
# PyD
7+
8+
PyD provides seamless interoperability between Python and the D programming language.
9+
10+
# Requirements
11+
12+
## Python
13+
14+
CPython 2.6+
15+
16+
## D Compilers
17+
18+
* DMD, LDC fe2.065+
19+
* GDC fe2.065+, embedding only (GDC still doesn't have shared library support!)
20+
21+
Note all D compilers are based on DMD's front end, so while LDC and GDC have
22+
their own verisoning schemes, I only pay attention to the front end version.
23+
24+
25+
[build-status-badge]: https://travis-ci.org/ariovistus/pyd.svg?branch=master
26+
[build-status]: https://travis-ci.org/ariovistus/pyd
27+
[docs-badge]: https://readthedocs.org/projects/pyd/badge/
28+
[docs]: http://pyd.readthedocs.org/
29+
[pypi-version]: https://pypip.in/version/pyd/badge.svg
30+
[pypi]: https://pypi.python.org/pypi/pyd
31+
[license-badge]: https://pypip.in/license/pyd/badge.svg
32+
[license]: https://pypi.python.org/pypi/pyd/

credits.txt

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
Python/D bindings:
2-
Deja Augustine, David Rushby, Kirk McDonald
3-
4-
CeleriD:
5-
David Rushby, Kirk McDonald
6-
7-
Pyd:
8-
Kirk McDonald
1+
Python/D bindings:
2+
Deja Augustine, David Rushby, Kirk McDonald
3+
4+
CeleriD:
5+
David Rushby, Kirk McDonald
6+
7+
Pyd:
8+
Kirk McDonald

docs/deimos_modules.ddoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MODULES =
1+
MODULES =
22
$(MODULE deimos.python.abstract_)
33
$(MODULE deimos.python.ast)
44
$(MODULE deimos.python.boolobject)

docs/modules.ddoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MODULES =
1+
MODULES =
22
$(MODULE pyd.class_wrap)
33
$(MODULE pyd.def)
44
$(MODULE pyd.embedded)

docs/source/authors.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Authors
1+
Authors
22
=======
33

44
PyD was originally written by Kirk McDonald.
@@ -9,7 +9,7 @@ Other contributors:
99
* Deja Augustine
1010
* Don Clugston
1111
* Ellery Newcomer
12-
12+
1313
Special thanks to Tomasz Stachowiak and Daniel Keep for providing now-defunct metaprogramming modules which were vital to the early development of Pyd.
1414

1515

docs/source/classes.rst

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Exposing D classes to python
22
============================
33

4-
The heart of PyD's class wrapping features is the `class_wrap`
4+
The heart of PyD's class wrapping features is the `class_wrap`
55
function template.
66

77
Member wrapping
@@ -70,7 +70,7 @@ Specify whether property is read-only, write-only, or read-write.
7070

7171
Possible values: :code:`"r"`, :code:`"w"`, :code:`"rw"`, :code:`""`
7272

73-
When :code:`""`, determine mode based on availability of getter and setter
73+
When :code:`""`, determine mode based on availability of getter and setter
7474
forms.
7575

7676
Default: :code:`""`
@@ -105,29 +105,29 @@ Operator
105105
Notes on wrapped operators
106106
* only one overload is permitted per operator; however OpBinary and OpBinaryRight may "share" an operator.
107107
* PyD only supports opSlice, opSliceAssign if both of their two indices are
108-
implicitly convertable to Py_ssize_t. This is a limitation of the
109-
Python/C API. Note this means the zero-argument form of opSlice
108+
implicitly convertable to Py_ssize_t. This is a limitation of the
109+
Python/C API. Note this means the zero-argument form of opSlice
110110
(:code:`foo[]`) cannot be wrapped.
111-
* :code:`~`, :code:`~=`: Python does not have a dedicated array
112-
concatenation operator.
113-
:code:`+` is reused for this purpose. Therefore, odd behavior may result
111+
* :code:`~`, :code:`~=`: Python does not have a dedicated array
112+
concatenation operator.
113+
:code:`+` is reused for this purpose. Therefore, odd behavior may result
114114
with classes that overload both :code:`+` and :code:`~`. The Python/C API
115-
does consider addition and concantenation to be distinct operations,
115+
does consider addition and concantenation to be distinct operations,
116116
though.
117-
* :code:`in`: Semantics vary slightly. In python, :code:`in` is a
118-
containment test and retursn a bool. In D, by convention
117+
* :code:`in`: Semantics vary slightly. In python, :code:`in` is a
118+
containment test and retursn a bool. In D, by convention
119119
:code:`in` is a lookup, returning a pointer or null. PyD will check the
120120
boolean result of a call to the overload and return that value to Python.
121121

122122

123123
Iterator wrapping
124124
-----------------
125125

126-
A wrapped class can be make iterable in python by supplying defs with the
126+
A wrapped class can be make iterable in python by supplying defs with the
127127
python names:
128128

129129
* :code:`__iter__`, which should return :code:`this`.
130-
* :code:`next`, which should return the next item, or null to signal
130+
* :code:`next`, which should return the next item, or null to signal
131131
termination. Signature must be :code:`PyObject* next()`.
132132

133133
Alternatively, you can supply a single :code:`__iter__` that returns a Range.

docs/source/conversion.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type Conversion
22
===============
33

4-
PyD provides `d_to_python` and `python_to_d` for converting types to and from
4+
PyD provides `d_to_python` and `python_to_d` for converting types to and from
55
python. These functions almost always do a copy. If you want reference semantics, use `PydObject`.
66

77
D to Python
@@ -51,7 +51,7 @@ complex std.complex.Complex
5151
float float, double, real
5252
int, long Any integral type
5353
bool bool
54-
buffer dynamic or static array (with many dimensions!)
54+
buffer dynamic or static array (with many dimensions!)
5555
datetime.date std.datetime.Date, std.datetime.DateTime, std.datetime.SysTime
5656
datetime.datetime std.datetime.Date, std.datetime.DateTime, std.datetime.SysTime, std.datetime.Time
5757
datetime.time std.datetime.Time
@@ -79,11 +79,11 @@ class or struct.
7979
results:
8080

8181
.. code-block:: python
82-
82+
8383
example.foo()
8484
example.bar(20)
8585
8686
.. code-block:: bash
87-
87+
8888
12
8989
S(20)

docs/source/distutils.rst

+12-12
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ PyD and distutils
44
PyD provides patches to distutils so it can use DMD, LDC, and GDC.
55

66
.. seealso::
7-
7+
88
`distutils <https://docs.python.org/2/library/distutils.html#module-distutils>`__
99

1010

@@ -64,26 +64,26 @@ Default: :code:`False`
6464

6565
with_pyd
6666
--------
67-
Setting this flag to :code:`False` suppresses compilation and linkage of PyD.
68-
`with_main` effectively becomes :code:`False` as well; `PydMain` won't be used
67+
Setting this flag to :code:`False` suppresses compilation and linkage of PyD.
68+
`with_main` effectively becomes :code:`False` as well; `PydMain` won't be used
6969
unless PyD is in use.
7070

7171
Default: :code:`True`
7272

7373
with_main
7474
---------
75-
Setting this flag to :code:`False` suppresses the use of `PydMain`, allowing
75+
Setting this flag to :code:`False` suppresses the use of `PydMain`, allowing
7676
the user to write a C-style init function instead.
7777

7878
Default: :code:`True`
7979

8080
build_deimos
8181
------------
82-
Build object files for deimos headers. Ideally, this should not be necessary;
83-
however some compilers (\*cough* ldc) try to link to PyObject typeinfo. If you
84-
get link errors like
82+
Build object files for deimos headers. Ideally, this should not be necessary;
83+
however some compilers (\*cough* ldc) try to link to PyObject typeinfo. If you
84+
get link errors like
8585

86-
`undefined symbol: _D6deimos6python12methodobject11PyMethodDef6__initZ`
86+
`undefined symbol: _D6deimos6python12methodobject11PyMethodDef6__initZ`
8787

8888
try setting this flag to :code:`True`.
8989

@@ -112,24 +112,24 @@ Default: :code:`False`
112112
d_property
113113
----------
114114

115-
Have D compilers enable property checks (i.e. trying to call functions without
115+
Have D compilers enable property checks (i.e. trying to call functions without
116116
parens will result in an error)
117117

118118
Default: :code:`False`
119119

120120
string_imports
121121
--------------
122122

123-
Specify string import files to pass to D compilers. Takes a list of strings
124-
which are either paths to import files or paths to directories containing
123+
Specify string import files to pass to D compilers. Takes a list of strings
124+
which are either paths to import files or paths to directories containing
125125
import files.
126126

127127
Default: :code:`[]`
128128

129129

130130
pydexe
131131
~~~~~~
132-
PyD also provides a custom command to compile D code that embeds python. The
132+
PyD also provides a custom command to compile D code that embeds python. The
133133
format of setup.py stays the same.
134134

135135
.. literalinclude:: ../../examples/pyind/setup.py

docs/source/embed.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Some Notes:
1414
Once again, we use distutils to compile this code using the special command `pydexe`:
1515

1616
.. literalinclude:: ../../examples/simple_embedded/setup.py
17-
17+
1818
.. code-block:: bash
1919
2020
$ python setup.py install
@@ -36,11 +36,11 @@ call stack is not deep enough
3636
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3737

3838
Certain python modules (i.e. :code:`inspect`) expect python to have a nonempty
39-
call stack. This seems not to be the case in embedded python. To work around
39+
call stack. This seems not to be the case in embedded python. To work around
4040
this, use :code:`InterpContext.pushDummyFrame`:
4141

4242
.. code-block:: d
43-
43+
4444
context.pushDummyFrame();
4545
py_stmts("import inspect");
4646
context.popDummyFrame();

docs/source/exception.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ The raw Python/C API has a protocol for allowing C extensions to use Python's ex
55

66

77
:code:`handle_exception`
8-
------------------------
9-
check if a Python exception has been set, and if it has, throw a
8+
------------------------
9+
check if a Python exception has been set, and if it has, throw a
1010
:code:`PythonException`. Clear the Python error code.
1111

1212
:code:`exception_catcher`
13-
-------------------------
14-
wrap a D delegate and set a Python error code if a D exception occurs.
15-
Returns a python-respected "invalid" value (null or -1), or the result of
13+
-------------------------
14+
wrap a D delegate and set a Python error code if a D exception occurs.
15+
Returns a python-respected "invalid" value (null or -1), or the result of
1616
the delegate if nothing was thrown.
1717

1818
Notes
19-
* If your code interfaces with python directly, you should probably
19+
* If your code interfaces with python directly, you should probably
2020
wrap it with :code:`exception_catcher` (uncaught D exceptions will crash
2121
the python interpreter).
22-
* All wrapped functions, methods, constructors, etc, handle D and
22+
* All wrapped functions, methods, constructors, etc, handle D and
2323
python exceptions already.

docs/source/extend.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This extension is then built the usual way with distutils, except PyD provides s
2424
2525
$ python setup.py install
2626
27-
Usage:
27+
Usage:
2828

2929
.. code-block:: python
3030

docs/source/functions.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ specify the module in which to inject the function
5454

5555
Default: `''`
5656

57-
.. _Docstring:
57+
.. _Docstring:
5858

5959
Docstring
6060
---------
@@ -63,7 +63,7 @@ Specify the docstring to associate with the function
6363

6464
Default: :code:`''`
6565

66-
.. _PyName:
66+
.. _PyName:
6767

6868
PyName
6969
------

docs/source/pydobject.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ PydObject wraps a PyObject*. It handles the python reference count for you, and
77
:language: d
88

99
Notes:
10-
* Due to some residual awkwardness with D's properties, member functions
11-
with zero or one arguments must be accessed through `method`,
10+
* Due to some residual awkwardness with D's properties, member functions
11+
with zero or one arguments must be accessed through `method`,
1212
`method_unpack`, etc. Member functions with two or more arguments can be
1313
called directly.
14-
* Calling a member function will result in another PydObject; call
14+
* Calling a member function will result in another PydObject; call
1515
:code:`to_d!T()` to convert it to a D object.
1616
* PydObjects are callable
1717
* PydObjects are iterable
@@ -20,6 +20,6 @@ Notes:
2020
Buffer protocol
2121
---------------
2222

23-
PydObject exposes a near-raw interface to the buffer protocol which can be
24-
used to e.g. read values from a numpy array without copying the entire thing
23+
PydObject exposes a near-raw interface to the buffer protocol which can be
24+
used to e.g. read values from a numpy array without copying the entire thing
2525
into a D data structure.

0 commit comments

Comments
 (0)