#NEWLINE# def components( self , currencies = None ) : #NEWLINE# #INDENT# if ( currencies is None ) : #NEWLINE# #INDENT# currencies = sorted ( self . currencies ( ) ) #NEWLINE# #UNINDENT# if len ( currencies ) : #NEWLINE# #INDENT# result = [ ] #NEWLINE# for currency in currencies : #NEWLINE# #INDENT# amount = self . values . get ( currency , 0 ) #NEWLINE# if amount : #NEWLINE# #INDENT# result . append ( Value ( { #NEWLINE# #INDENT# currency : amount , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# result . append ( ZERO ) #NEWLINE# #UNINDENT# #UNINDENT# return result #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return [ ZERO ]