Python, Erlang, Map/Reduce
I have an obvious bug (that I have not yet fixed, but it is identified), in the routine that checks the logs for referrers. Plus a power supply burned tonight. The power supply has been replaced, but in the process of cleaning the entries I erased accidentally, and google’s cache is too old, the one proposing a short version by using a try: except: pass idiom to avoid having to check for matches vs. None. Please, do you have the code? I read it fast and can’t remember the name/URL.
In a sense,
def Filter(Iterator):
while Something in Iterator:
try: yield UnsafeOp(Something)
except: pass
is a useful filter in the chain. Not unlike the regex one (yield all matches...)
Posted by Santiago Gala