[Biopython-dev] private methods/vars

Iddo Friedberg idoerg at burnham.org
Mon Jun 23 12:32:11 EDT 2003


It's a Python convention. There are no "real" private attributes in 
Python. (Attribute: anything that comes after a ".", can be a method or 
a class variable). Attributes which start with a "_" will not get 
imported globaly when using the ``from *'' statement, although they may 
be imported using  a specific ``from''. An attribute which starts & ends 
with a __ (double undescore) is conventionally an overloaded attribute 
in a inherited class.

ik3 at mail.inf.tu-dresden.de wrote:
> Hello,
> 
> at the moment i try to become familiar with biopython.
> 
> So my question is, why you are using only one underscore for private
> methods and variables in a class ? Or aren't they private ?
> 
> Because if you use only one, then it is not really private.
> 
> Or i'm wrong? Please help.
> 
> Greetings,
> Ingo
> 
> 
> 
> 
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at biopython.org
> http://biopython.org/mailman/listinfo/biopython-dev
> 
> 

-- 
Iddo Friedberg, Ph.D.
The Burnham Institute
10901 N. Torrey Pines Rd.
La Jolla, CA 92037
USA
Tel: +1 (858) 646 3100 x3516
Fax: +1 (858) 646 3171
http://ffas.ljcrf.edu/~iddo




More information about the Biopython-dev mailing list