--0016e64089d0bf6824046a5d305d
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

On Wed, May 20, 2009 at 1:25 PM, Tony Arcieri <tony / medioh.com> wrote:

> I already responded to this.  I guess you didn't see it.  There are several
> types of statements which contain multiple indent blocks (and thus multiple
> dedent tokens).  These would include if statements: [... snip ...]
>
> Begin statements (ala try/catch in Python) [... snip ...]
>
> Case statements: [... snip ...]
>
> case foo
> when bar
>  do_something
> when baz
>  do_something_else
>

And yet another consideration with this in Ruby vs. Python: in Ruby these
are all expressions (as has been stated repeatedly) and therefore you can do
this sort of thing:

x  ase foo
when bar
  do_something
when baz
  do_something_else
else
  whatever
end

i.e. the case statement returns the value of the last expression evaluated
in the taken branch.

This is not the case in Python (well first because Python doesn't have case
statements) where no expressions can contain indent blocks.

-- 
Tony Arcieri
medioh.com

--0016e64089d0bf6824046a5d305d--