Skip to content

Commit acdcbb7

Browse files
committed
suggested details
1 parent 2d47da7 commit acdcbb7

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

src/sage/matrix/strassen.pyx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,13 +254,11 @@ def strassen_echelon(MatrixWindow A, cutoff):
254254
255255
INPUT:
256256
257-
258257
- ``A`` - matrix window
259258
260259
- ``cutoff`` - size at which algorithm reverts to
261260
naive Gaussian elimination and multiplication must be at least 1.
262261
263-
264262
OUTPUT: The list of pivot columns
265263
266264
EXAMPLES::

src/sage/misc/binary_tree.pyx

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,14 @@ cdef binary_tree_node *binary_tree_head_excise(binary_tree_node *self):
128128
if self.left == NULL:
129129
return self.right
130130
if right:
131-
#move right branch to left, return left
131+
# move right branch to left, return left
132132
cur = self.left
133133
while cur.right != NULL:
134134
cur = cur.right
135135
cur.right = self.right
136136
cur = self.left
137137
else:
138-
#move left branch to right, return right
138+
# move left branch to right, return right
139139
cur = self.right
140140
while cur.left != NULL:
141141
cur = cur.left
@@ -206,15 +206,15 @@ cdef class BinaryTree:
206206
....: return [(k,v) for (k,v) in post.items() if v>10]
207207
sage: test() # indirect doctest
208208
[]
209-
210209
"""
211210
binary_tree_dealloc(self.head)
212211

213-
def insert(BinaryTree self, object key, object value = None):
212+
def insert(BinaryTree self, object key, object value=None):
214213
"""
215214
Insert a key-value pair into the BinaryTree.
216215
217216
Duplicate keys are ignored.
217+
218218
The first parameter, key, should be an int, or coercible (one-to-one)
219219
into an int.
220220
@@ -298,13 +298,11 @@ cdef class BinaryTree:
298298
"""
299299
if self.head == NULL:
300300
return None
301-
else:
302-
return binary_tree_get(self.head, key)
301+
return binary_tree_get(self.head, key)
303302

304303
def contains(BinaryTree self, int key):
305304
"""
306-
Return ``True`` if a node with the given key exists
307-
in the tree, and ``False`` otherwise.
305+
Return whether a node with the given key exists in the tree.
308306
309307
EXAMPLES::
310308
@@ -318,11 +316,7 @@ cdef class BinaryTree:
318316
"""
319317
if self.head == NULL:
320318
return False
321-
else:
322-
if binary_tree_get(self.head, key) is not None:
323-
return True
324-
else:
325-
return False
319+
return binary_tree_get(self.head, key) is not None
326320

327321
def get_max(BinaryTree self):
328322
"""
@@ -432,7 +426,7 @@ cdef class BinaryTree:
432426

433427
def is_empty(BinaryTree self):
434428
"""
435-
Return ``True`` if the tree has no nodes.
429+
Return whether the tree has no nodes.
436430
437431
EXAMPLES::
438432

0 commit comments

Comments
 (0)