I have the following code:
students_list = []
for student in students:
student_dict = {}
dict_student['nane'] = name
logger.info(student_dict['name'])
# prints ==> MÓNICA MENÉNDEZ GALLEGOS
dict_student['address'] = address
logger.info(student_dict['address'])
# prints ==> GENERAL YAGÜE 32
students_list.append(dict_student)
logger.info(students_list)
# prints => [{'name':u'M\xd3NICA MEN\xc9NDEZ GALLEGOS', 'address': u'GENERAL YAG\xdcE 32}
As you can see, it is a very simple piece of code. I get a value, assign it to a dictionary and append said dict to a list.
The thing that is annoying me is that when I log the value of student_dict['name'] I can see all the characters properly.
However, when I log the whole list, its data doesn't show properly.
Why is this?
encodingparameter?encondingparameter. I am just using thelogger.infomethod from the TurboGears2 framework.