On 21 April 2011 19:52, Dan McGee <[email protected]> wrote: > On Thu, Apr 21, 2011 at 8:59 AM, <[email protected]> wrote: > > From: Ivan Kanakarakis <[email protected]> > > > > This commit replaces the find_config() function with the get_from() > > function. get_from expects two arguments, the first is the file to > > read and the second is the key to look for in the given file. > > get_from returns the first matching value for the given key. The > > file is expected to be in the format: > > key = value > > Each of 'key' 'equal sign' 'value' can be surrounded be random > > whitespace. > > No objection to this, but you explained the "what". What is the "why" > on this one? > > -Dan > > I find this safer and easier to understand/read instead of a regex. A regex can hide flaws not apparent in first sight. More of a code-reading and keep my head in peace issue, for me.
-- Ivan c00kiemon5ter V Kanak http://c00kiemon5ter.github.com
