Re: Testing for the first few letters of a string

2008-08-07 Thread magloca
John Machin wrote: >> import re >> template = '^My name is alex' > > The ^ is redundant. Didn't the OP want to match only at the beginning of the string? m. -- http://mail.python.org/mailman/listinfo/python-list

Re: exception handling in complex Python programs

2008-08-21 Thread magloca
Bruno Desthuilliers @ Thursday 21 August 2008 17:31: >>> If you mean "the exceptions *explicitely raised* by your code", then >>> I agree. But with any generic enough code, documenting any possible >>> exception that could be raised by lower layers, objects passed in as >>> arguments etc is just p

Re: exception handling in complex Python programs

2008-08-22 Thread magloca
Bruno Desthuilliers @ Thursday 21 August 2008 22:54: > magloca a écrit : >> Bruno Desthuilliers @ Thursday 21 August 2008 17:31: >> >>>>> If you mean "the exceptions *explicitely raised* by your code", >>>>> then I agree. But with any generi