summaryrefslogtreecommitdiffstats
path: root/Lib/urllib/request.py
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2013-05-24 16:14:12 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2013-05-24 16:14:12 (GMT)
commit8307075ce870375f1d1f7344972f78f9c42b39e8 (patch)
tree19fd346ea71cf5fdfed95c5b99a96ffc4cce973a /Lib/urllib/request.py
parentdc3e6cc452a2a4409a4d12804fab4e474abbf9ff (diff)
downloadcpython-8307075ce870375f1d1f7344972f78f9c42b39e8.zip
cpython-8307075ce870375f1d1f7344972f78f9c42b39e8.tar.gz
cpython-8307075ce870375f1d1f7344972f78f9c42b39e8.tar.bz2
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/request.py')
-rw-r--r--Lib/urllib/request.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index 3258102..fdb1ec8 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):