Ben Finney wrote: > The double-underscore convention seems more for attributes *that are > interpreted specially*, e.g. by syntax operators or other core > language features.
I would qualify that by adding that it's for attributes that are treated specially _and when you don't want to overload other names_, especially when you wouldn't just call the thing normally in the course of dealing with the object's interface. i.e., a[x] --> a.__getitem__(x), but we don't want to prevent you from (perhaps blissfully unaware) defining your own getitem method. > Go ahead and implement your protocol using attributes with plain > names. What makes it a protocol is that it's likely to be generally > applicable, and the names are chosen to apply to other classes equally > well. Agreed. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis To be refutable is not the least charm of a theory. -- Friedrich Nietzsche -- http://mail.python.org/mailman/listinfo/python-list