webpy/webpy — pull request #209 by iamFIREcracker (2013-01-27 11:41:11+00:00)
Title: Add support for sqlite to dburl2dict utility function

With this pull request I'm trying to support `sqlite` database urls inside the utility function `dburl2dict`.

As you can see from the patch, I decided to initialize `user`, `pw`, `host` and `port` to empty strings, then to pop corresponding items from the output dictionary before returning it.

Another solution would have been to initialize `out` with the sole mandatory fields (i.e. `dbn` and `db`) and fill optional ones if set, but in this case all the existing doctests should have been rewritten as well (the keys insertion ordering in the output dictionary would have been different).