Skip to content

Commit

Permalink
Fix python code block syntax and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sgillies committed Sep 17, 2020
1 parent 584102c commit 4f408e3
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions docs/manual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1004,28 +1004,28 @@ a schema of ``{'properties': {'bar': 'int', 'foo': 'str'}}`` will produce
a shapefile where the first field is 'foo' and the second field is 'bar'. If
you want 'bar' to be the first field, you must use a list of property items

.. code-block:: pycon
.. code-block:: python
c = fiona.open(
'/tmp/file.shp',
'w',
schema={'properties': [('bar', 'int'), ('foo', 'str')], ...},
... )
fiona.open(
"/tmp/file.shp",
"w",
schema={"properties": [("bar", "int"), ("foo", "str")]},
**kwargs
)
or an ordered dict.

.. code-block:: python
from collections import OrderedDict
schema_props = OrderedDict([('bar', 'int'), ('foo', 'str')])
c = fiona.open(
'/tmp/file.shp',
'w',
schema={'properties': schema_props, ...},
... )
from collections import OrderedDict
schema_props = OrderedDict([("bar", "int"), ("foo", "str")])
fiona.open(
"/tmp/file.shp",
"w",
schema={"properties": schema_props},
**kwargs
)
Coordinates and Geometry Types
------------------------------
Expand Down

0 comments on commit 4f408e3

Please sign in to comment.