On Aug 21, 2013 10:53 AM, <random...@fastmail.us> wrote:
>
> On Mon, Aug 19, 2013, at 3:05, Steven D'Aprano wrote:
> > In this toy example, both parties are at fault: the author of Parrot for
> > unnecessary data-hiding of something which is so obviously a useful
piece
> > of information and should be part of the public interface,
>
> It may wish to be notified when its name changes, and so have a name
> property.

The example as given has no such property, and regardless of whether it is
a property or an attribute the public API should just be called "name".

> The subclass may want to use a variable called _name for some
> other purpose. (maybe "name" isn't the best example).

Probably not a good idea for multiple reasons if the base class already has
something called "name".
 On Aug 21, 2013 10:53 AM, <random...@fastmail.us> wrote:

> On Mon, Aug 19, 2013, at 3:05, Steven D'Aprano wrote:
> > In this toy example, both parties are at fault: the author of Parrot for
> > unnecessary data-hiding of something which is so obviously a useful piece
> > of information and should be part of the public interface,
>
> It may wish to be notified when its name changes, and so have a name
> property. The subclass may want to use a variable called _name for some
> other purpose. (maybe "name" isn't the best example).
>
> Examples often look pathological when you simplify out the bit that
> makes them make sense.
>
> --
> Random832
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to