Issue 31918: Don't let all python code modify modules

Issue31918

Created on 2017-11-01 09:55 by nagayev, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg305362 - (view) Author: Марат Нагаев (nagayev) * Date: 2017-11-01 09:58
import os
os="os"
#I think it's bad, os and other modules constants
msg305363 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-11-01 10:03
You haven't modified the os module. You have just binded a new value to the os variable. You can assign arbitrary values to your variables, this is a feature of Python.
History
Date User Action Args
2022-04-11 14:58:53adminsetgithub: 76099
2017-11-01 10:03:10serhiy.storchakasetstatus: open -> closed

nosy: + serhiy.storchaka
messages: + msg305363

resolution: not a bug
stage: resolved

2017-11-01 10:01:00nagayevsetcomponents: + Extension Modules
2017-11-01 09:58:59nagayevsetmessages: + msg305362
title: D -> Don't let all python code modify modules
2017-11-01 09:55:52nagayevcreate