Arc Forumnew | comments | leaders | submitlogin
1 point by greatness 6137 days ago | link | parent

True, but the returns are more useful (assuming has_key returns T if it has the key. I am unfamiliar with python I'm afraid).

If the current syntax is difficult to memorize, you could always write a simple function which abstracts it away into something you're more familiar with:

  (def haskey (ls key) (alref ls key))
Then you can use it:

  (if (haskey mylist "username") ... )