[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-talk
Subject: Re: Need examples comparing Ruby to Python
From: Mark Hubbart <discord () mac ! com>
Date: 2004-02-24 21:20:55
Message-ID: 51AE4790-670F-11D8-848B-000502FDD5CC () mac ! com
[Download RAW message or body]
On Feb 23, 2004, at 6:57 AM, Emmanuel Touzery wrote:
> the ruby code could be simplified:
> ...
I'm getting into this a little late, but...
This takes care of it nicely, and looks pretty good:
file, length, name, title = line.chomp.squeeze.split(" | ")
And, assuming "songs" is an array:
songs << Song.new(file, length, name, title)
It's difficult to simplify the ("m:ss" => sec) time conversion (while
still having it be readable) so I'll just leave that one alone, thank
you. :)
--Mark
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic