Skip to content

Commit c314872

Browse files
committed
Merge branch 'main' of github.com:pythonfluente/pythonfluente2e
2 parents 99ec389 + 679c6ef commit c314872

22 files changed

+1944
-734
lines changed

code/12-seq-hacking/soma-pythonica.ipynb

Lines changed: 480 additions & 0 deletions
Large diffs are not rendered by default.

code/12-seq-hacking/vector_v1.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
A multi-dimensional ``Vector`` class, take 1
2+
A multi-dimensional `Vector` class, take 1
33
4-
A ``Vector`` is built from an iterable of numbers::
4+
A `Vector` is built from an iterable of numbers::
55
66
>>> Vector([3.1, 4.2])
77
Vector([3.1, 4.2])
@@ -70,7 +70,7 @@
7070
9.53939201...
7171
7272
73-
Test of ``.__bytes__`` and `.frombytes()` methods::
73+
Test of `.__bytes__` and `.frombytes()` methods::
7474
7575
>>> v1 = Vector([3, 4, 5])
7676
>>> v1_clone = Vector.frombytes(bytes(v1))

code/12-seq-hacking/vector_v2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
A multi-dimensional ``Vector`` class, take 2
2+
A multi-dimensional `Vector` class, take 2
33
4-
A ``Vector`` is built from an iterable of numbers::
4+
A `Vector` is built from an iterable of numbers::
55
66
>>> Vector([3.1, 4.2])
77
Vector([3.1, 4.2])
@@ -70,7 +70,7 @@
7070
9.53939201...
7171
7272
73-
Test of ``.__bytes__`` and `.frombytes()` methods::
73+
Test of `.__bytes__` and `.frombytes()` methods::
7474
7575
>>> v1 = Vector([3, 4, 5])
7676
>>> v1_clone = Vector.frombytes(bytes(v1))

code/12-seq-hacking/vector_v3.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
A multi-dimensional ``Vector`` class, take 3
2+
A multi-dimensional `Vector` class, take 3
33
4-
A ``Vector`` is built from an iterable of numbers::
4+
A `Vector` is built from an iterable of numbers::
55
66
>>> Vector([3.1, 4.2])
77
Vector([3.1, 4.2])
@@ -70,7 +70,7 @@
7070
9.53939201...
7171
7272
73-
Test of ``.__bytes__`` and `.frombytes()` methods::
73+
Test of `.__bytes__` and `.frombytes()` methods::
7474
7575
>>> v1 = Vector([3, 4, 5])
7676
>>> v1_clone = Vector.frombytes(bytes(v1))

code/12-seq-hacking/vector_v4.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
A multi-dimensional ``Vector`` class, take 4
2+
A multi-dimensional `Vector` class, take 4
33
4-
A ``Vector`` is built from an iterable of numbers::
4+
A `Vector` is built from an iterable of numbers::
55
66
>>> Vector([3.1, 4.2])
77
Vector([3.1, 4.2])
@@ -70,7 +70,7 @@
7070
9.53939201...
7171
7272
73-
Test of ``.__bytes__`` and `.frombytes()` methods::
73+
Test of `.__bytes__` and `.frombytes()` methods::
7474
7575
>>> v1 = Vector([3, 4, 5])
7676
>>> v1_clone = Vector.frombytes(bytes(v1))

code/12-seq-hacking/vector_v5.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# tag::VECTOR_V5[]
22
"""
3-
A multidimensional ``Vector`` class, take 5
3+
A multidimensional `Vector` class, take 5
44
5-
A ``Vector`` is built from an iterable of numbers::
5+
A `Vector` is built from an iterable of numbers::
66
77
>>> Vector([3.1, 4.2])
88
Vector([3.1, 4.2])
@@ -71,7 +71,7 @@
7171
9.53939201...
7272
7373
74-
Test of ``.__bytes__`` and `.frombytes()` methods::
74+
Test of `.__bytes__` and `.frombytes()` methods::
7575
7676
>>> v1 = Vector([3, 4, 5])
7777
>>> v1_clone = Vector.frombytes(bytes(v1))

code/16-op-overloading/vector_v6.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
A multi-dimensional ``Vector`` class, take 6: operator ``+``
2+
A multi-dimensional `Vector` class, take 6: operator ``+``
33
4-
A ``Vector`` is built from an iterable of numbers::
4+
A `Vector` is built from an iterable of numbers::
55
66
>>> Vector([3.1, 4.2])
77
Vector([3.1, 4.2])
@@ -70,7 +70,7 @@
7070
9.53939201...
7171
7272
73-
Test of ``.__bytes__`` and `.frombytes()` methods::
73+
Test of `.__bytes__` and `.frombytes()` methods::
7474
7575
>>> v1 = Vector([3, 4, 5])
7676
>>> v1_clone = Vector.frombytes(bytes(v1))

code/16-op-overloading/vector_v7.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
A multi-dimensional ``Vector`` class, take 7: operator ``*``
2+
A multi-dimensional `Vector` class, take 7: operator ``*``
33
4-
A ``Vector`` is built from an iterable of numbers::
4+
A `Vector` is built from an iterable of numbers::
55
66
>>> Vector([3.1, 4.2])
77
Vector([3.1, 4.2])
@@ -70,7 +70,7 @@
7070
9.53939201...
7171
7272
73-
Test of ``.__bytes__`` and `.frombytes()` methods::
73+
Test of `.__bytes__` and `.frombytes()` methods::
7474
7575
>>> v1 = Vector([3, 4, 5])
7676
>>> v1_clone = Vector.frombytes(bytes(v1))

code/16-op-overloading/vector_v8.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
A multi-dimensional ``Vector`` class, take 8: operator ``==``
2+
A multi-dimensional `Vector` class, take 8: operator ``==``
33
4-
A ``Vector`` is built from an iterable of numbers::
4+
A `Vector` is built from an iterable of numbers::
55
66
>>> Vector([3.1, 4.2])
77
Vector([3.1, 4.2])
@@ -70,7 +70,7 @@
7070
9.53939201...
7171
7272
73-
Test of ``.__bytes__`` and `.frombytes()` methods::
73+
Test of `.__bytes__` and `.frombytes()` methods::
7474
7575
>>> v1 = Vector([3, 4, 5])
7676
>>> v1_clone = Vector.frombytes(bytes(v1))

images/flpy_1301.png

3.29 KB
Loading

0 commit comments

Comments
 (0)