diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2013-05-24 09:14:12 -0700 |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2013-05-24 09:14:12 -0700 |
commit | 86129a219ca9df4abec0784f96b9866a26c88f3a (patch) | |
tree | 2834da858d288e046e2b4d70cf965ccbbb987214 /Lib/urllib | |
parent | ecee03696fbefe26d8bdc5af4a93e806b6eb38c3 (diff) | |
download | cpython-86129a219ca9df4abec0784f96b9866a26c88f3a.tar.gz |
Fix #17272 - Make Request.full_url and Request.get_full_url return same result under all circumstances.
Document the change of Request.full_url to a property.
Diffstat (limited to 'Lib/urllib')
-rw-r--r-- | Lib/urllib/request.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index 32581023a1..fdb1ec87b0 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -275,6 +275,8 @@ class Request: @property def full_url(self): + if self.fragment: + return '{}#{}'.format(self._full_url, self.fragment) return self._full_url @full_url.setter @@ -326,8 +328,6 @@ class Request: return "GET" def get_full_url(self): - if self.fragment: - return '{}#{}'.format(self.full_url, self.fragment) return self.full_url def set_proxy(self, host, type): |