diff options
author | Hartmut Goebel <h.goebel@crazy-compilers.com> | 2019-03-10 19:46:23 +0100 |
---|---|---|
committer | Hartmut Goebel <h.goebel@crazy-compilers.com> | 2019-03-10 19:49:39 +0100 |
commit | 4deae01fba7218d3e31cc008e390c392ea9a2238 (patch) | |
tree | d71a988f640e80a40768a102619a1baf7363a545 /src/consensus/consensus-simulation.py.in | |
parent | 8de3cc8ba8126cd2464a010526b94b8daf63718b (diff) | |
download | gnunet-4deae01fba7218d3e31cc008e390c392ea9a2238.tar.gz gnunet-4deae01fba7218d3e31cc008e390c392ea9a2238.zip |
Cleanup Python code: remove `import __future__`.
All of these only made Python 2 accept some Python 3 language idioms,
and the code is Python-3-only.
Diffstat (limited to 'src/consensus/consensus-simulation.py.in')
-rw-r--r-- | src/consensus/consensus-simulation.py.in | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/consensus/consensus-simulation.py.in b/src/consensus/consensus-simulation.py.in index 161015d00..23639b195 100644 --- a/src/consensus/consensus-simulation.py.in +++ b/src/consensus/consensus-simulation.py.in | |||
@@ -17,9 +17,6 @@ | |||
17 | # | 17 | # |
18 | # SPDX-License-Identifier: AGPL3.0-or-later | 18 | # SPDX-License-Identifier: AGPL3.0-or-later |
19 | 19 | ||
20 | from __future__ import absolute_import | ||
21 | from __future__ import print_function | ||
22 | from __future__ import division | ||
23 | from builtins import str | 20 | from builtins import str |
24 | from builtins import range | 21 | from builtins import range |
25 | from past.utils import old_div | 22 | from past.utils import old_div |
@@ -49,8 +46,6 @@ def simulate(k, n, verbose): | |||
49 | print("we have", num_ghosts, "ghost peers") | 46 | print("we have", num_ghosts, "ghost peers") |
50 | # n.b. all peers with idx<k are evil | 47 | # n.b. all peers with idx<k are evil |
51 | peers = list(range(n)) | 48 | peers = list(range(n)) |
52 | # py2-3 compatible, backwards. | ||
53 | # refer to http://python-future.org/compatible_idioms.html#xrange | ||
54 | info = [1 << x for x in range(n)] | 49 | info = [1 << x for x in range(n)] |
55 | 50 | ||
56 | def done_p(): | 51 | def done_p(): |