On 07/20/12 14:45, Shawn Walker wrote:
On 07/20/12 14:30, Brock Pytlik wrote:
On 07/20/12 14:27, Shawn Walker wrote:
On 07/20/12 14:18, Brock Pytlik wrote:
On 07/19/12 19:46, Danek Duvall wrote:
Brock Pytlik wrote:
...
[snip]
How else would I denote functions that I don't want the general public
to call, but expect "friend" classes to? Ultimately, it's a
shortcoming of Python that it doesn't offer a formal mechanism for
this, but it is how I and others have used it in the pkg project.
I agree that python doesn't offer a better way to do this. I believe the
right answer here is to avoid this situation except when absolutely
necessary. This situation doesn't meet my criteria for absolutely
necessary. That it's rare to find in our gate reflects, I think, our
recognition that this isn't something we want to do much of.
Frankly, I'd argue that except in extraordinary circumstances, the right
answer is to promote it to a public function and deal with it, or to
otherwise restructure the code to avoid it. From what I remember off
hand, the places where we do this much tend to be the regions of code
that I think need to be redesigned, or at least have designs that might
be necessary (for performance or other reasons) but which are difficult
to work with.
Brock
-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss