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:
...
transport.py:
- I would put this change into image.py instead -- have a private
__verify_manifest() that called _verify_manifest(), caught the
exception, and returned true or false.
I can do that, but I think I have two issues with it. The first is that
then we're calling a protected method from another class. The second is
that I don't think _verify_manifest is an appropriate "public" interface
because it raises the exception and having the method verify_manifest
which returns true or false seemed more appropriate to me. If what I've
said here hasn't convinced you, let's talk offline and see if we can
reach a conclusion.
I don't follow the protected member argument; for Python, protected
really means "only classes that know each other should be calling
this; it's not a general public interface".
I don't follow your argument. Any two classes can "know each other." Can
you point me to the python docs that define this relationship? My
understanding was that, by convention just as class privacy is enforced
by convention, methods prefixed with a single underscore should only be
called by the class and its subclasses.
In any case, it makes no sense to me to have "verify_manifest" in one
class, and "_verify_manifest" in another class when all the first does
(basically) is call the second. If the first really needs to go into
image.py, then let's look at moving the second there as well.
Brock
-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss