Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3cf750b

Browse files
author
Harish Kesava Rao
committed
Incorporated changes from style suggestions
1 parentfd2a8f3 commit3cf750b

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

‎docs/scenarios/serialization.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Flat vs. Nested data
2121
********************
2222

2323
Before beginning to serialize data, it is important to identify or decide how the
24-
dataneeds to be structured during data serialization - flat or nested.
24+
datashould to be structured during data serialization - flat or nested.
2525
The differences in the two styles are shown in the below examples.
2626

2727
Flat style:
@@ -42,7 +42,7 @@ Nested style:
4242
For more reading on the two styles, please see the discussion on
4343
`Python mailing list<https://mail.python.org/pipermail/python-list/2010-October/590762.html>`__,
4444
`IETF mailing list<https://www.ietf.org/mail-archive/web/json/current/msg03739.html>`__ and
45-
`here<https://softwareengineering.stackexchange.com/questions/350623/flat-or-nested-json-for-hierarchal-data>`__.
45+
`in stackexchange<https://softwareengineering.stackexchange.com/questions/350623/flat-or-nested-json-for-hierarchal-data>`__.
4646

4747
****************
4848
Serializing Text
@@ -57,7 +57,7 @@ If the data to be serialized is located in a file and contains flat data, Python
5757
repr
5858
----
5959

60-
The repr method in Python takes a single object parameter and returns a printable representation of the input
60+
The repr method in Python takes a single object parameter and returns a printable representation of the input:
6161

6262
..code-block::python
6363
@@ -79,7 +79,7 @@ ast.literal_eval
7979
----------------
8080

8181
The literal_eval method safely parses and evaluates an expression for a Python datatype.
82-
Supported data types are: strings, numbers, tuples, lists, dicts, booleans and None.
82+
Supported data types are: strings, numbers, tuples, lists, dicts, booleans, and None.
8383

8484
..code-block::python
8585
@@ -114,8 +114,8 @@ Simple example for writing:
114114
writer.writerows(iterable)
115115
116116
117-
The module's contents, functions and examples can be found
118-
`here<https://docs.python.org/3/library/csv.html>`__.
117+
The module's contents, functions, and examples can be found
118+
`in the Python documentation<https://docs.python.org/3/library/csv.html>`__.
119119

120120
==================
121121
YAML (nested data)
@@ -178,29 +178,29 @@ Example:
178178
root= tree.getroot()
179179
180180
More documentation on using the `xml.dom` and `xml.sax` packages can be found
181-
`here<https://docs.python.org/3/library/xml.html>`__.
181+
`in the Python XML library documentation<https://docs.python.org/3/library/xml.html>`__.
182182

183183

184184
*******
185185
Binary
186186
*******
187187

188188
=======================
189-
Numpy Array (flat data)
189+
NumPy Array (flat data)
190190
=======================
191191

192-
Python'sNumpy array can be used to serialize and deserialize data to and from byte representation.
192+
Python'sNumPy array can be used to serialize and deserialize data to and from byte representation.
193193

194194
Example:
195195

196196
..code-block::python
197197
198-
importnumpyas np
198+
importNumPyas np
199199
200-
# ConvertingNumpy array to byte format
200+
# ConvertingNumPy array to byte format
201201
byte_output= np.array([ [1,2,3], [4,5,6], [7,8,9] ]).tobytes()
202202
203-
# Converting byte format back toNumpy array
203+
# Converting byte format back toNumPy array
204204
array_format= np.frombuffer(byte_output)
205205
206206

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp