4 ms·
> Can I modify one of this "by convention" constants without a parsing error? Depends on the language. Python does not enforce constants, so you can modify the
by actsasbuffoon 10y ago
> Can I modify one of this "by convention" constants without a parsing error?
Depends on the language. Python does not enforce constants, so you can modify them freely. JavaScript as of the ES5 spec did not enforce constants, but ES6 does. Ruby mostly enforces constants, but there are certain bits of metaprogramming that will allow you to overwrite a constant if you are determined enough.