__all__ does not work?

AndyL ask at me
Tue May 9 19:27:32 EDT 2006


This a mm.py module:

_all__=('getsize1',)

size=85

def getsize1():
     return size

def getsize2():
     return 2*size


I do not know why but getsize2 is not kept priviate?

$ python
Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.

 >>>>>> import mm
 >>>>>> mm.getsize2()

170




Any ideas?

A.




More information about the Python-list mailing list