Re: Optional module names export list

2011-02-20 Thread Dmitry Olshansky
On 20.02.2011 3:48, spir wrote: On 02/20/2011 12:46 AM, bearophile wrote: In a Python module if you define a name with a starting underscore, that name will be private to that module, and it will not be imported if a command "from module_name import *" is used: class Name1: pass def name2():

Re: Optional module names export list

2011-02-19 Thread Jonathan M Davis
On Saturday 19 February 2011 15:46:51 bearophile wrote: > In a Python module if you define a name with a starting underscore, that > name will be private to that module, and it will not be imported if a > command "from module_name import *" is used: > > class Name1: pass > def name2(): pass > _pri

Re: Optional module names export list

2011-02-19 Thread spir
On 02/20/2011 12:46 AM, bearophile wrote: In a Python module if you define a name with a starting underscore, that name will be private to that module, and it will not be imported if a command "from module_name import *" is used: class Name1: pass def name2(): pass _private_name3 = 3 name4 = 4

Optional module names export list

2011-02-19 Thread bearophile
In a Python module if you define a name with a starting underscore, that name will be private to that module, and it will not be imported if a command "from module_name import *" is used: class Name1: pass def name2(): pass _private_name3 = 3 name4 = 4 In Python there is another optional way to