in reply to Re: How do you define "elegant"?
in thread How do you define "elegant"?

Personally, I think the long isleap() form is clearer to the maintenance coder, since it will resemble the problem definitions they will find in non-code sources. It's more literate, even without the comments, just for the visual rhythm and the name of the sub. I would deem the one-liner more clever, but cleverness is not a programmers' virtue.

I otherwise agree with your overall thrust.

As for the ternary, python has long tried to resist the loud calls for its inclusion, on the same sort of grounds as your C programming team. I think last I heard it was adopted for 2.5, but I could be wrong. Sometimes even Guido must bend to pragmatism.

--
[ e d @ h a l l e y . c c ]