Added namespace_from_url()
Corrected the incorrect import.
Test for namespace_from_url
namespace_from_url: Changed documentation.
Only 'www' as the last item should be removed.
Also watch for a trailing dot in the hostname. It's technically valid and will give you a blank string as the first item in the list.
Corrected logic in namespace_from_url. Will return None for invalid urls.
Tests for invalid URLs.
Additional constraints and tests.
Don't mangle input data. Bad things happen.
Merge pull request #36 from hasgeek/namespace_from_url

Added namespace_from_url()