Bill Janssen wrote: > 1) Mainly, all methods are special to someone. But some, such as those that have special meaning to the language itself, are more special than others.
__methods__ are not just plain old methods with funny names. You write regular methods to express functionality you wish your class to have, but you write __methods__ to provide low-level glue tying your class in with the interpreter. This lets the interpreter maintain a kind of pleasant fiction in which user code can depend on system methods, like len() or attribute access, returning sensible results and performing sensible actions even for objects the user code knows nothing about. This difference is substantial enough that a different terminology has been quietly tossed around: the name `defop` implicitly proposes that __methods__ are really "operations". I'm not sure if I like the term yet, but in the meantime, thinking about these methods as system glue, staples, paperclips, or a different fastener term of your choice, might illuminate the difference further. :) -- Ivan Krstić <[EMAIL PROTECTED]> | GPG: 0x147C722D _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com