Demian Brecht added the comment:

Yes, I realized that I had forgotten to add the "do nothing" option after 
posting but figured it was relatively obvious :)

"Python doesn't normally make things read-only just because mutating them does 
nothing useful.  Sometimes we make things read-only when mutating them does 
nasty stuff, but even then sometimes we don't."

I realize that this is a higher level question and outside of the scope of this 
particular issue (and likely belonging more in python-ideas), but doesn't this 
somewhat contradict "There should be one-- and preferably only one --obvious 
way to do it."? I'd assume that this should not only apply to sandboxed object 
implementations, but also at a higher level across /all/ objects. From your 
post, I assume inconsistency between modules, which would imply non-obvious 
ways to "do something" when moving from one module (or object) implementation 
to the next.

I'm definitely interested to hear whether or not others would find this change 
useful as I do. There /should/ be no other changes required for consistency as 
no other attributes of the Request class that don't already implement 
assignment methods (i.e. "data") are affected by side effects within __init__ 
(or anywhere else).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17272>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to