How come the length Current_Stock.open can be greater than 0 if I just created the instance of the class?
def initialize_stock(row):
Current_Stock=Stock()
print len(Current_Stock.open)
do some stuff than return object
Loop that calls initializer
for row in xrange(1,sheet.nrows,25):
New_Stock= Stock() #create new instance of class
New_Stock= initialize_stock(row)
stocks.append(New_Stock) #add instance to stocks array
Stock class
class Stock:
name=''
date=[]
open=[]
high=[]
low=[]
close=[]
percent_change_price=[]
percent_change_volume= []