re.search when used within an if/else fails
steve+comp.lang.python at pearwood.info
Tue Nov 20 02:29:20 CET 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
- 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.
More information about the Python-list