Field separators, again

Evan Martin evan.martin at gmail.com
Tue Jun 7 17:43:15 PDT 2005


On 6/7/05, Paul Crowley <paul at ciphergoth.org> wrote:
> [...] I think that's
> overkill for now; everyone should be able to parse the format here with
> hardly any code.

But see, e.g., http://www.xml.com/pub/a/2003/10/15/dive.html , which
lists difficulty in parsing that a similar as a flaw in the LJ API.

Not that I agree with it, but there's some public perception for you.

> In Python, for example, you can do it with
> 
> dict([(lambda x, y: (x, y.rstrip()))(*l.split(':',1)) for l in f])
> 
> What do other poeple think?

Golf time!  Haskell can almost do it with just
map (break (':' ==)) $ lines f
;)


More information about the yadis mailing list