| Thread Previous • Date Previous • Date Next • Thread Next |
Il 17/03/2014 17:38, Yannick Vaucher @ Camptocamp ha scritto:
Review: Needs Fixing
Instead of dict.update({split_key: m2m_list})
You can simply write
dict['split_key'] = m2m_list
It might be a bit more readable
If you use dict['split_key'], are you sure 'split_key' key exists in dict? If you use update, python create the key for you if not exist or update it if exists yet.
| Thread Previous • Date Previous • Date Next • Thread Next |