On Sat, Apr 25, 2009 at 10:43 AM, <bearophileh...@lycos.com> wrote: > Ciprian Dorin, Craciun: >> Python way: >> --------- >> def eq (a, b) : >> return a == b >> >> def compare (a, b, comp = eq) : >> if len (a) != len (b) : >> return False >> for i in xrange (len (a)) : >> if not comp (a[i], b[i]) : >> return False >> return True > > That's not "pythonic". > > Bye, > bearophile > -- > http://mail.python.org/mailman/listinfo/python-list
Ok... Then what's pythonic? Please give a pythonic implementation... Ciprian Craciun. P.S.: Also, I'm tired of hearing about the pythonic way... Where do I find a definitive description about the pythonic way? I think that this word is used only when someone sees something that he doesn't like, he doesn't know what he doesn't like at it, and just goes to say its un-pythonic, without saying what would be... Wouldn't be just easier to say "I don't know" or "I doesn't feel right to me"? -- http://mail.python.org/mailman/listinfo/python-list