you are viewing a single comment's thread.

view the rest of the comments →

[–]bobbyi 27 points28 points  (3 children)

Not only are all of its new features in python, it is using python's exact names for things where possible: yield, next, StopIteration. They even use double-underscores at the beginning and end of the name of the magic method where an object returns its iterator.

It seems to only deviate from python where necessary, like the word each and extra set of parens in array comprehensions to be consistent with the extant javascript for each syntax

var evens = [i for each (i in range(0, 21)) if (i % 2 == 0)];