In article ,
Alia K wrote:
>Aahz wrote:
>>
>> Longer answer: the way in Python to achieve the full power of Ruby
>> blocks is to write a function.
>
>You are most likely right... there is probably no need to introduce
>ruby-like blocks to python where iteration comes naturally with list
>comprehe
On Sat, 21 Feb 2009 09:42:02 -0800, Aahz wrote:
> In article ,
> Alia K wrote:
>>
>>Nevertheless, I remain curious about whether once can use the
>>contextmanager in python to achieve the full power of ruby's blocks...
>
> Short answer: no
>
> Longer answer: the way in Python to achieve the fu
Aahz wrote:
> Longer answer: the way in Python to achieve the full power of Ruby
> blocks is to write a function.
You are most likely right... there is probably no need to introduce
ruby-like blocks to python where iteration comes naturally with list
comprehensions and generators. But for the simp
In article ,
Alia K wrote:
>
>Nevertheless, I remain curious about whether once can use the
>contextmanager in python to achieve the full power of ruby's blocks...
Short answer: no
Longer answer: the way in Python to achieve the full power of Ruby
blocks is to write a function.
--
Aahz (a...@p
Francesco wrote:
> ... ruby code that shows the most twisted 'Hellow world' example I have
> ever seen :-) ...
and I was gunning for the simplest possible example (-:
> ... python code doing the same thing - apparently -
> of prevous ruby code, using context managers in a way that I believe the
On Sat, 21 Feb 2009 00:46:08 -0800, Alia Khouri wrote:
> As an exercise, I recently translated one of my python scripts (http://
> code.activestate.com/recipes/576643/) to haskell (a penultimate
> version exists at
> http://groups.google.com/group/comp.lang.haskell/browse_thread/thread/fb1ebd986b
As an exercise, I recently translated one of my python scripts (http://
code.activestate.com/recipes/576643/) to haskell (a penultimate
version exists at
http://groups.google.com/group/comp.lang.haskell/browse_thread/thread/fb1ebd986b44244e#
in case anyone is interested) with the result that haske