Re: [BangPypers] class instance getting passed to other class obj creation

2014-03-09 Thread Sriram Karra
If your login is a simple action I would not even make it a separate class. You should revisit your class hierarchy. On Mar 9, 2014 4:38 PM, "Nitin Kumar" wrote: > Hi All, > > I am looking for some better way to implement below scenario. > > Say there is a class login > > class login: > def __i

Re: [BangPypers] class instance getting passed to other class obj creation

2014-03-09 Thread shreyas
You could make login instance a module level variable and then use that as a singleton. shreyas On Mar 9, 2014 4:38 PM, "Nitin Kumar" wrote: > Hi All, > > I am looking for some better way to implement below scenario. > > Say there is a class login > > class login: > def __init_(self, user, pwd):

Re: [BangPypers] class instance getting passed to other class obj creation

2014-03-09 Thread Gora Mohanty
On 9 March 2014 16:37, Nitin Kumar wrote: > > Hi All, > > I am looking for some better way to implement below scenario. > > Say there is a class login > > class login: > def __init_(self, user, pwd): > - > > now user uses this class to login a session and then I am using the object > of this c