Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e11e40c

Browse files
Merge pull request #9 from ErfanThinker/patch-1
Removed redundant condition
2 parents 2a71f28 + 565e405 commit e11e40c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎ch16/circuitTests.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ def create_gene(index, gates, sources):
5353
if gateType[1].input_count() > 0:
5454
indexA = random.randint(0, index)
5555
if gateType[1].input_count() > 1:
56-
indexB = random.randint(0, index) \
57-
if index > 1 and index >= len(sources) else 0
56+
indexB = random.randint(0, index)
5857
if indexB == indexA:
5958
indexB = random.randint(0, index)
6059
return Node(gateType[0], indexA, indexB)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /