[Python-Dev] Object customization (was: Arbitrary attributes on
funcs and methods)
Greg Stein
gstein@lyra.org
Fri, 14 Apr 2000 14:52:22 -0700 (PDT)
On Fri, 14 Apr 2000, Fred L. Drake, Jr. wrote:
> Ken Manheimer writes:
> > (Oh, and i'd suggest up front that documentation for this feature
> > recommend people not use "__*__" names for their own object attributes, to
> > avoid collisions with eventual use of them by python.)
>
> Isn't that a standing recommendation for all names?
Yup. Personally, I use "_*" for private variables or other "hidden" type
things that shouldn't be part of an object's normal interface. For
example, all the stuff that the Python/COM interface uses is prefixed by
"_" to denote that it is metadata about the classes rather than part of
its interface.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/