convert string literal to object attribute

2008-10-31 Thread BiraRai
def getAttributeForProperty(self,rollnumber,attribute): # attribute have the value _ward ''' If year is null then use current year. Returns the value of the attribute for the given roll number ''' print 'Searching for attribute', attribute for

Re: convert string literal to object attribute

2008-10-31 Thread BiraRai
On Oct 31, 3:00 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Fri, 31 Oct 2008 11:40:02 -0700, BiraRai wrote: > > def getAttributeForProperty(self,rollnumber,attribute): > >    # attribute have the value _ward > >    ''' >

object creation

2008-11-14 Thread BiraRai
for record in roll: x = box() x.createSomething(record) do something Can anyone tell me why python keeps return the original object x that was created in the FOR loop. I want to instantiate a new x object for each iteration of the FOR loop -- http://mail.python.org/mailman/list

Re: object creation

2008-11-14 Thread BiraRai
On Nov 14, 5:44 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Nov 14, 5:16 pm, BiraRai <[EMAIL PROTECTED]> wrote: > > > for record in roll: > >     x = box() > >     x.createSomething(record) > >     do something > > > Can anyone tell me