Re: try/except/finally

2014-06-09 Thread Philip Shaw
On 2014-06-08, Dave Angel wrote: > Frank B Wrote in message: >> Ok; this is a bit esoteric. >> >> So finally is executed regardless of whether an exception occurs, so states >> the docs. >> >> But, I thought, if I from my function first, that should take >> precedence. >> >> au contraire >>

Re: How to use SQLite (sqlite3) more efficiently

2014-06-09 Thread Philip Shaw
On 2014-06-06, Mark Lawrence wrote: > On 06/06/2014 22:58, Dave Angel wrote: >> Chris Angelico Wrote in message: >>> On Sat, Jun 7, 2014 at 4:15 AM, R Johnson >>> wrote: > The subject line isn't as important as a header, carried invisibly > through, that says that you were replying to an

Re: Get named groups from a regular expression

2014-07-03 Thread Philip Shaw
On 2014-07-01, Florian Lindner wrote: > > Is there a way I can extract the named groups from a regular > expression? e.g. given "(?P\d)" I want to get something > like ["testgrp"]. The match object has an attribute called "groupdict", so you can get the found named groups using match.groupdict.k