Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
__all__ does not work?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="skip, post: 1879235"] Andy> This a mm.py module: Andy> _all__=('getsize1',) Andy> size=85 Andy> def getsize1(): Andy> return size Andy> def getsize2(): Andy> return 2*size Andy> I do not know why but getsize2 is not kept priviate? That's not what __all__ is used for. Try this: from mm import * The only name added to your namespace will be getsize1. Skip [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
__all__ does not work?
Top