Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on A friendly Introduction to Backpropagation in Python. Parent comment
forwardAddGate
would be
forward_add_gate
and return is not a function call...
return(max(x,y)) or return(x+y)
return max(x, y) or return x + y
spaces around operators...
x + y not x+y
spaces around function args...
def foo(a, b) not def foo(a,b)
and when calling...
foo(1, 2) not foo(1,2)
https://www.python.org/dev/peps/pep-0008/
Just things to think about when publishing python code for the greater community.
forwardAddGate
would be
forward_add_gate
and return is not a function call...
return(max(x,y)) or return(x+y)
would be
return max(x, y) or return x + y
spaces around operators...
x + y not x+y
spaces around function args...
def foo(a, b) not def foo(a,b)
and when calling...
foo(1, 2) not foo(1,2)
https://www.python.org/dev/peps/pep-0008/
Just things to think about when publishing python code for the greater community.