[Import-SIG] PEP 420 issue: extend_path
Eric V. Smith
eric at trueblade.com
Wed May 9 14:58:23 CEST 2012
On 05/09/2012 02:48 AM, martin at v.loewis.de wrote:
> I must have missed Nick's message where he explained it, so I still need
> to ask again: how exactly would such a zip file be structured?
I'll work on such an example. But I think Nick's example of a config
file that has the configuration for multiple portions of a single
namespace package is more compelling. I don't see where returning a list
for the common case of a single portion is a large burden.
> I fail to see the need to ever report both a loader and a portion,
> as well as the need to report multiple portions, for a single sys.path
> item. That sounds like an unnecessary complication.
As Nick said, you'd return a loader, a list of portions, or neither. it
would be an error to return both. I'm mildly sympathetic to not wanting
to inspect either the type or attributes of the returned value to figure
out which is being returned. A callback to specify the portions seem
needlessly complex and a hassle for a C implementation. My compromise is
to return a tuple. I don't think a tuple is much of a burden. It's not
like writing finders which support namespace portions will be a common
More information about the Import-SIG