From: Steven Arnold Date: 2009-05-22T12:56:47+09:00 Subject: Re: Pythonic indentation (or: beating a dead horse) On May 21, 2009, at 10:24 PM, Tony Arcieri wrote: > Quite frequently I do something like: > > str = [a, b, c].map do |x| > thing1 = do_something_to x > thing2 = do_something_else_to x > "#{thing1}:#{thing2}" > end.join(",") Me too. It's interesting how seemingly small changes can generate a lot of unexpected corner cases and unforeseen consequences. Of course, one could argue that using indentation does not preclude using explicit blocks in the same file. I doubt, for example, that anyone wishing to remove the 'end' keyword would wish to disallow something like: array_of_strings_that_are_numbers.sort! {|a,b| a.to_i <=> b.to_i} ...even though the {} brackets are the same as do..end. If explicit blocks were allowed in the same file where blocks were, by default, determined by indentation, then you could have your cake and eat it too in the example above. Nevertheless, I think your gut feel is correct......this would be a tricky thing to do right. steven