|
|
|
|
|
by dragonwriter
1682 days ago
|
|
> In Python some standard operations are global functions and some are methods. Typically, all of the former are also the latter because the global function just calls the corresponding method. E.g., len(x) works by calling x.__len__(). > As the article is about, loops in Python are for blah in blah. In Ruby they're ...for blah in blah, if you choose to use them at all, which has the same semantics as the python. It relies on method calls to #each under the hood, and usually in Ruby you won't bother with for/in, but it is there still... |
|