I dont understand this :p

This is the place for queries that don't fit in any of the other categories.

I dont understand this :p

Postby ChristopherL » Thu Jul 18, 2013 2:48 pm


I am going through and documenting it.. Can someone just explain what happends here?
Maybe comment the steps or something like that?
Would be great!
I am a rookie at python so understand if this might seem easy for you hah!
Wellwell, pre-thanks! :)

/ C

Code: Select all
       if positionValues['nominal'] != None and round(positionValues['nominal']) != 0:
            if not positionDict[profitCentre]['positions'].has_key(row['id']):
                positionDict[profitCentre]['positions'][row['id']] = positionInfo   

            if positionDict[profitCentre]['positions'][row['id']].has_key(date):
                register.exit('Error, duplicate position %s in portfolio %s.')
            positionDict[profitCentre]['positions'][row['id']][date] = positionValues
Posts: 22
Joined: Tue Jul 16, 2013 2:03 pm

Re: I dont understand this :p

Postby Yoriz » Fri Jul 19, 2013 1:37 pm

It sets somes values if the conitional requirements are met.
Due to the reasons discussed here we will be moving to python-forum.io/ on October 1 2016
This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
Posts: 1672
Joined: Fri Feb 08, 2013 1:35 am
Location: UK

Return to General Coding Help

Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests