adding 'by' to array comprehensions

This commit is contained in:
Jeremy Ashkenas
2010-02-06 10:12:57 -05:00
parent b795ae7fe1
commit decaea0f5f
2 changed files with 9 additions and 2 deletions

View File

@@ -40,3 +40,9 @@ for method in methods
print obj.one() is "I'm one"
print obj.two() is "I'm two"
print obj.three() is "I'm three"
# Steps should work for array comprehensions.
array: [0..10]
print num % 2 is 0 for num in array by 2