[Import-SIG] PEP 420 issue: extend_path
pje at telecommunity.com
Tue May 8 18:09:07 CEST 2012
On Tue, May 8, 2012 at 10:07 AM, Eric V. Smith <eric at trueblade.com> wrote:
> I don't disagree with this. But we've got a function that we're asking
> to return one of 2 things, as you say. How is this normally handled? I
> would not use a callback. I'd return a tuple with the two things:
> (loader, list_of_portions). That seems way more straightforward.
+1. It's also easy to implement.
I'm not sure why we *need* a list of portions, but if we do, simple return
values seem like the way to go. But the 2-element tuple wins even in the
single path portion case, and the tuple-return protoocol is extensible if
we need more data returned in future anyway.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Import-SIG