Demian Brecht added the comment:

It could entirely be my lack of being Dutch that didn't make this obvious 
without reading the docs ;)

I guess there's one of three ways that this could go:

To help clarify the intention through code, either

a) Change full_url to _full_url, indicating that this should be treated as a 
private member and only expose the url through get_full_url(). This will 
obviously have the negative side effect of breaking backwards compatibility for 
anyone using full_url directly.

b) Keep the property implementation in the patch, but replace the setter with a 
read-only exception.

And the third option is what's in this patch (there are likely other options 
that I'm just not seeing at the moment as well).

Having said all that, if the mutability of full_url is made explicit, then 
safeguards should also be put in place for the rest of the attributes.


I couldn't think of any hard reason as to why the state of a Request instance 
/shouldn't/ be mutable and the user should be required to instantiate a new 
Request in order to use a new URL.

----------

_______________________________________
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