I have a problem with the following code
my_list = []
for i in xrange(1, 13):
my_list.append(MyObject(year=year, month=i))
I dont know why when calling append method all elements in the list are replaced by new element. So when loop is finished I have 12 same elements in the list. Please help.
I suspect the problem is with your MyObject class
Are you storing the year and month as class attributes instead of instance variables?