Re: pointer and python

2013-10-17 Thread Steven D'Aprano
On Fri, 18 Oct 2013 06:43:12 +0330, Mohsen Pahlevanzadeh wrote: > On Fri, 2013-10-18 at 00:54 +0100, MRAB wrote: [...] >> Why are you using attributes anyway? Why not just store them in a dict? >> >> > At first i store them in a dict: > ###33 > for

Re: pointer and python

2013-10-17 Thread Mohsen Pahlevanzadeh
On Fri, 2013-10-18 at 00:54 +0100, MRAB wrote: > On 18/10/2013 00:17, Mohsen Pahlevanzadeh wrote: > > Dear all, > > > > Suppose I have the following code: > > ##3 > > mydic = dict() > > mydict.update({'string':QtGui.QCheckBox()}) ## suppose this dic has many

Re: pointer and python

2013-10-17 Thread MRAB
On 18/10/2013 00:17, Mohsen Pahlevanzadeh wrote: Dear all, Suppose I have the following code: ##3 mydic = dict() mydict.update({'string':QtGui.QCheckBox()}) ## suppose this dic has many value with some string and QCheckBox Object If you do this, you're gi

pointer and python

2013-10-17 Thread Mohsen Pahlevanzadeh
Dear all, Suppose I have the following code: ##3 mydic = dict() mydict.update({'string':QtGui.QCheckBox()}) ## suppose this dic has many value with some string and QCheckBox Object #Then i have itreate it : for key, val in mydict.items(): setattr(s