re.search when used within an if/else fails

Steven D'Aprano steve+comp.lang.python at pearwood.info
Mon Nov 19 20:29:20 EST 2012


On Tue, 20 Nov 2012 01:24:54 +0000, Steven D'Aprano wrote:

> Your code is mangled to the point of unreadability.

Ah, never mind, that's *my* fault, not yours. Or rather, my news reader 
software. Sorry about the noise.

The rest of my post still stands:


- simplify your example to the simplest example that we can run
  http://sscce.org/

- don't put line numbers at the start of lines

- your code doesn't have an else clause

- use "if something is None", not == None.



-- 
Steven



More information about the Python-list mailing list