def urldefrag(url):
 (url, _coerce_result) = _coerce_args(url)
 if ('#' in url):
  (s, n, p, a, q, frag) = urlparse(url)
  defrag = urlunparse((s, n, p, a, q, ''))
 else:
  frag = ''
  defrag = url
 return _coerce_result(DefragResult(defrag, frag))

def urldefrag ( url ) : ( url , _coerce_result ) = _coerce_args ( url ) if ( '#' in url ) : ( s , n , p , a , q , frag ) = urlparse ( url ) defrag = urlunparse ( ( s , n , p , a , q , '' ) ) else : frag = '' defrag = url return _coerce_result ( DefragResult ( defrag , frag ) )
removes any existing fragment from url .