The Stack Overflow podcast is back! Listen to an interview with our new CEO.

New answers tagged


Type hints and the truth def recursive_sort(input_list: List[T], temp_output_list: List[T], first_index: int, last_index: int) -> List[T]: This function actually returns None. Same with merge_sublists and copy_list. Loop like a native while i <= first_end_index: temp_output_list[k] = input_list[i] i += 1 k += 1 should at least be using ...


Docstrings are not comments; they exist to help the caller properly use the method. Consider: >>> import math >>> help(math.log) Help on built-in function log in module math: log(...) log(x, [base=math.e]) Return the logarithm of x to the given base. If the base not specified, returns the natural logarithm (base e) of x. &...

Top 50 recent answers are included