The modules you define will create a logical group and liberal use of modules will prevent pollution of the global namespace.
您定义的模块将创建一个逻辑组,模块的自由使用防止了全局名称空间的污染。
Obviously, global variables could do the same job, but they cause the familiar problems with pollution of the global namespace, and allow mistakes due to non-locality.
显而易见,全局变量可以做同样的工作,但它们带来了大家熟知的全局性名称空间污染的问题,并会因非局部性而引起错误。
Obviously, global variables could do the same job, but they cause the familiar problems with pollution of the global namespace, and allow mistakes due to non-locality.
显而易见,全局变量可以做同样的工作,但它们带来了大家熟知的全局性名称空间污染的问题,并会因非局部性而引起错误。
应用推荐