Re: PEP 420 issue: extend_path
PJ Eby <[email protected]>
| Newsgroups | gmane.comp.python.import |
|---|---|
| Message-ID | <CALeMXf6r0cCBs9GjbiyVYo8cw8GuA2DU0Lrj6zGsuWp-VXeC=w@mail.gmail.com> |
On Tue, May 8, 2012 at 10:07 AM, Eric V. Smith <[email protected]> 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. _______________________________________________ Import-SIG mailing list [email protected] http://mail.python.org/mailman/listinfo/import-sig