Skip to content

Commit 5f72728

Browse files
committed
-
1 parent 0c20c42 commit 5f72728

File tree

15 files changed

+14
-109
lines changed

15 files changed

+14
-109
lines changed

source_py3/python_toolbox/address_tools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright 2009-2014 Ram Rachum.
22
# This program is distributed under the MIT license.
33

4-
'''
4+
r'''
55
Module for manipulating Python addresses.
66
77
Use `resolve` to turn a string description into an object, and `describe` to

source_py3/python_toolbox/address_tools/object_to_string.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def get_address(obj, shorten=False, root=None, namespace={}):
150150
address = '.'.join((obj.__module__, obj.__self__.__class__.__name__,
151151
obj.__name__))
152152
else:
153-
address= '.'.join((obj.__module__, obj.__name__))
153+
address = '.'.join((obj.__module__, obj.__name__))
154154

155155
# Now our attempt at an address is in `address`. Let's `try` to resolve
156156
# that address to see if it's right and we get the same object:

source_py3/python_toolbox/address_tools/string_to_object.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
def resolve(string, root=None, namespace={}):
16-
'''
16+
r'''
1717
Resolve an address into a Python object. A more powerful version of `eval`.
1818
1919
The main advantage it has over `eval` is that it automatically imports

source_py3/python_toolbox/binary_search/functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ def _binary_search_both(sequence, value,
8989
medium = (low + high) // 2
9090
medium_value = get(medium)
9191
if medium_value > value:
92-
high = medium; high_value = medium_value
92+
high, high_value = medium, medium_value
9393
continue
9494
if medium_value < value:
95-
low = medium; low_value = medium_value
95+
low, low_value = medium, medium_value
9696
continue
9797
if medium_value == value:
9898
return (sequence[medium], sequence[medium])

source_py3/python_toolbox/caching/decorators.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
'''
99
# todo: examine thread-safety
1010

11-
import functools
1211
import datetime as datetime_module
1312

1413
from python_toolbox import misc_tools

source_py3/python_toolbox/combi/chain_space.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
11
import collections
2-
import types
3-
import sys
4-
import math
5-
import numbers
62

7-
from python_toolbox import misc_tools
83
from python_toolbox import binary_search
9-
from python_toolbox import dict_tools
104
from python_toolbox import nifty_collections
115
from python_toolbox import caching
126

13-
from python_toolbox import math_tools
147
from python_toolbox import sequence_tools
15-
from python_toolbox import cute_iter_tools
168
from python_toolbox import nifty_collections
179

18-
from . import misc
19-
from python_toolbox import misc_tools
20-
2110
infinity = float('inf')
2211

2312

source_py3/python_toolbox/combi/map_space.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,8 @@
11
import collections
2-
import types
3-
import sys
4-
import math
5-
import numbers
62

7-
from python_toolbox import misc_tools
8-
from python_toolbox import binary_search
9-
from python_toolbox import dict_tools
103
from python_toolbox import nifty_collections
114
from python_toolbox import caching
12-
13-
from python_toolbox import math_tools
145
from python_toolbox import sequence_tools
15-
from python_toolbox import cute_iter_tools
16-
from python_toolbox import nifty_collections
17-
from python_toolbox import misc_tools
18-
19-
from . import misc
206

217
infinity = float('inf')
228

source_py3/python_toolbox/combi/misc.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
import collections
2-
import types
3-
import sys
41
import math
5-
import numbers
6-
7-
from python_toolbox import dict_tools
8-
from python_toolbox import nifty_collections
9-
from python_toolbox import caching
102

113
from python_toolbox import math_tools
12-
from python_toolbox import sequence_tools
134
from python_toolbox import cute_iter_tools
145

156
infinity = float('inf')
@@ -20,6 +11,7 @@ class MISSING_ELEMENT:
2011

2112

2213
def get_short_factorial_string(number, minus_one=False):
14+
'''blocktotodoc'''
2315
assert number >= 0 and \
2416
isinstance(number, math_tools.PossiblyInfiniteIntegral)
2517
if number == infinity:

source_py3/python_toolbox/combi/product_space.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
11
import collections
2-
import types
3-
import sys
4-
import math
5-
import numbers
6-
7-
from python_toolbox import misc_tools
8-
from python_toolbox import binary_search
9-
from python_toolbox import dict_tools
10-
from python_toolbox import nifty_collections
11-
from python_toolbox import caching
122

133
from python_toolbox import math_tools
144
from python_toolbox import sequence_tools
15-
from python_toolbox import cute_iter_tools
16-
from python_toolbox import nifty_collections
17-
18-
from . import misc
19-
from python_toolbox import misc_tools
20-
21-
infinity = float('inf')
22-
235

246

257
class ProductSpace(sequence_tools.CuteSequenceMixin, collections.Sequence):
@@ -67,9 +49,7 @@ def index(self, given_sequence):
6749
not len(given_sequence) == len(self.sequences):
6850
raise ValueError
6951

70-
reverse_indices = []
7152
current_radix = 1
72-
7353
wip_index = 0
7454

7555
for item, sequence in reversed(tuple(zip(given_sequence,

source_py3/python_toolbox/combi/selection_space.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,6 @@
11
import collections
2-
import types
3-
import sys
4-
import math
5-
import numbers
62

7-
from python_toolbox import misc_tools
8-
from python_toolbox import binary_search
9-
from python_toolbox import dict_tools
10-
from python_toolbox import nifty_collections
11-
from python_toolbox import caching
12-
13-
from python_toolbox import math_tools
143
from python_toolbox import sequence_tools
15-
from python_toolbox import cute_iter_tools
16-
from python_toolbox import nifty_collections
17-
18-
from . import misc
19-
from python_toolbox import misc_tools
20-
21-
infinity = float('inf')
22-
234

245

256
class SelectionSpace(sequence_tools.CuteSequenceMixin,

0 commit comments

Comments
 (0)