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

Hiho!

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
ChristopherL
 
Posts: 13
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.
New Users, Read This
Join the #python-forum IRC channel on irc.freenode.net!
Image
User avatar
Yoriz
 
Posts: 1033
Joined: Fri Feb 08, 2013 1:35 am
Location: UK


Return to General Coding Help

Who is online

Users browsing this forum: Mekire, W3C [Linkcheck] and 4 guests