Skip to content

Commit

Permalink
spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
statkute committed Jul 1, 2024
1 parent 7fc95ca commit 4197782
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/tutorials/3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ There are many different approaches to fix this memory issue - here are a few of
alongside the object. ::

class Algorithms:
def __init__(self, inc: int):
self.inc = inc
self.factorial_plus = functools.cache(self._uncached_factorial_plus)
def __init__(self, inc: int):
self.inc = inc
self.factorial_plus = functools.cache(self._uncached_factorial_plus)

def _uncached_factorial_plus(self, n: int) -> int:
return n * self.factorial_plus(n - 1) + self.inc if n > 1 else 1 + self.inc
def _uncached_factorial_plus(self, n: int) -> int:
return n * self.factorial_plus(n - 1) + self.inc if n > 1 else 1 + self.inc

def generate_factorial_plus_last_digit(plus_range: int, factorial_range: int):
for i in range(plus_range):
Expand Down

0 comments on commit 4197782

Please sign in to comment.