Re: getting attributes and methods of class without creating object

2010-05-18 Thread Terry Reedy
On 5/18/2010 2:11 AM, shuvro wrote: to know the attributes of an instance of a class without actually creating that instance is very difficult. Is it not possible with the existing python facilities (without adding external libraries) ? To know what a function would do if you were to call it

Re: getting attributes and methods of class without creating object

2010-05-17 Thread shuvro
On May 18, 11:50 am, Patrick Maupin wrote: > On May 17, 10:52 pm, shuvro wrote: > > > > > Suppose I have a class like this - > > > class myClass(object): > > >     def __init__(self): > >         self.a = 10 > >         self.b = 20 > > >     def my_method(self,var = 20): > >         self.local_va

Re: getting attributes and methods of class without creating object

2010-05-17 Thread Patrick Maupin
On May 17, 10:52 pm, shuvro wrote: > Suppose I have a class like this - > > class myClass(object): > >     def __init__(self): >         self.a = 10 >         self.b = 20 > >     def my_method(self,var = 20): >         self.local_var = var > > I want to know about its method(__init__ and my_method

getting attributes and methods of class without creating object

2010-05-17 Thread shuvro
Suppose I have a class like this - class myClass(object): def __init__(self): self.a = 10 self.b = 20 def my_method(self,var = 20): self.local_var = var I want to know about its method(__init__ and my_method) and variables(a,b, local_var) without creating the obj