Comment on Python bug: Can assign [] = (), but not () = []parentComments−Jach11yOnly constant for certain values of "constant". ;)(https://gist.github.com/Jach/1208215 works in Python 3 too.)−teddyh11yAfter “import ctypes”, all bets are off.−IsTom11yThere are ways to mark memory pages as read-only. It's not even difficult.−rjaco3111yWhy would you do that? That code is working perfectly as intended, the user is allowed to do that
Comments
Only constant for certain values of "constant". ;)
(https://gist.github.com/Jach/1208215 works in Python 3 too.)
After “import ctypes”, all bets are off.
There are ways to mark memory pages as read-only. It's not even difficult.
Why would you do that? That code is working perfectly as intended, the user is allowed to do that