Been going through this book for kicks:
Mazes for programmers
The book is written in Ruby and I figured, "Hey, why not just pick up Ruby," while I went through it (even though translating the code to python is fairly trivial).
Despite the constant
The following is essentially looping over a range in python and assigning each value to the name
Not that I condone the latter's operator spacing, but the fact it means something different is insane.
Mazes for programmers
The book is written in Ruby and I figured, "Hey, why not just pick up Ruby," while I went through it (even though translating the code to python is fairly trivial).
Despite the constant
end
tags which I think make everything ugly as hell I just ran into this loveliness.The following is essentially looping over a range in python and assigning each value to the name
index
; straight forward: 0.upto(path.length - 2) do |index|
A little weird but fair enough.0.upto(path.length-2) do |index|
Yeah, that seems fine too.0.upto(path.length -2) do |index|
Error:`length': wrong number of arguments (given 1, expected 0) (ArgumentError)
... wtf.Not that I condone the latter's operator spacing, but the fact it means something different is insane.