On Wed, May 23, 2012 at 1:39 AM, Nick Coghlan <ncogh...@gmail.com> wrote: > def _recalculate(self): > # If _parent_path has changed, recalculate _path > parent_path = tuple(self._parent_path()) # Retrieve and make a > copy > if parent_path != self._last_parent_path: > loader, new_path = self._path_finder(self._name, parent_path) > # Note that no changes are made if a loader is returned, but we > # do remember the new parent path > if loader is None: > self._path = new_path > self._last_parent_path = parent_path # Save the copy > return self._path
Oops, I also meant to say that it's probably worth at least issuing ImportWarning if a new portion with an __init__.py gets added - it's going to block all future dynamic updates of that namespace package. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com