Closed hupili closed 6 years ago
@hupili update --> b84b9ae scan the whole document, replacing conflict word in variable names. Including str, dict, list.
list1
is not good. That let's people think list
could be a valid name. Please use mylist
if you can not find a proper name.
If there is a physical meaning, we usually embed the physical meaning in the variable name. For example, if you have a list of articles, either say articles = []
or article_list = []
.
update ea3c183
FAQ: https://github.com/hupili/python-for-data-and-media-communication-gitbook/blob/master/python-language-basics.md#name-clash-with-reserved-word