From 8307075ce870375f1d1f7344972f78f9c42b39e8 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Fri, 24 May 2013 09:14:12 -0700 Subject: 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. --- Lib/urllib/request.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Lib/urllib/request.py') 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): -- cgit v1.2.1