Dave Baum <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> johnny <[EMAIL PROTECTED]> wrote:
>
>> scope of "def main()" interms of class A?
>>
>> myModule:
>>
>> class A:
>>main()
>>
>> def main():
>>
>
> Yes, class A can access main. The name "main" will be defined at th
In article <[EMAIL PROTECTED]>,
johnny <[EMAIL PROTECTED]> wrote:
> Can a class inside a module, access a method, outside of class, but
> inside of the module?
>
> Eg. Can instance of class a access main, if so how? What is the
> scope of "def main()" interms of class A?
>
> myModule:
>
> cl
johnny <[EMAIL PROTECTED]> wrote:
> Can a class inside a module, access a method, outside of class, but
> inside of the module?
>
> Eg. Can instance of class a access main, if so how? What is the
> scope of "def main()" interms of class A?
>
> myModule:
>
> class A:
>main()
>
> def main(
This works for me.Also tried importing this module into another program.
The class is inside the module so like the different function's of a module
can access each other,the same thing applies to a class and
functions/classes
#Test Module
class foo:
def __init__(self):
self.
Can a class inside a module, access a method, outside of class, but
inside of the module?
Eg. Can instance of class a access main, if so how? What is the
scope of "def main()" interms of class A?
myModule:
class A:
main()
def main():
thnx.
--
http://mail.python.org/mailman/listinfo/pyt