Skip to content

Commit

Permalink
Change Declaration of Var 'j' to None (TheAlgorithms#921)
Browse files Browse the repository at this point in the history
Since `j` is redefined before it is used, it makes more sense to declare it with the value `None` instead of `1`.

This fixes a [warning from lgtm](https://lgtm.com/projects/g/TheAlgorithms/Python/snapshot/66c4afbd0f28f9989f35ddbeb5c9263390c5d192/files/other/primelib.py?sort=name&dir=ASC&mode=heatmap)
  • Loading branch information
PatOnTheBack authored and poyea committed Jun 30, 2019
1 parent 34889fc commit 2333f93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion other/primelib.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def goldbach(number):

# run variable for while-loops.
i = 0
j = 1
j = None

# exit variable. for break up the loops
loop = True
Expand Down

0 comments on commit 2333f93

Please sign in to comment.