Author loewis
Recipients hynek, loewis, lukasz.langa, ncoghlan, rhettinger, serhiy.storchaka
Date 2013-08-04.11:49:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Nick: that the code is difficult to decipher is really the fault of functional programming, which is inherently difficult to decipher (since last function applied is written first).

Explicit iteration is easier to read. I would write Hynek's example as

for r in (re1, re2):
    m = r.match('abc')
    if not m:
        print('No match)
    elif r is re1:
    elif r is re2:
    break # always

This is only two additional lines, very Pythonic (IMO), and doesn't invoke match unnecessarily.
Date User Action Args
2013-08-04 11:49:38loewissetrecipients: + loewis, rhettinger, ncoghlan, lukasz.langa, hynek, serhiy.storchaka
2013-08-04 11:49:38loewissetmessageid: <>
2013-08-04 11:49:38loewislinkissue18652 messages
2013-08-04 11:49:38loewiscreate