def unslug(s):
 m = _UNSLUG_RE.match(s)
 if (not m):
  return (None, None)
 return (m.group(1), int(m.group(2)))

def unslug ( s ) : m = _UNSLUG_RE . match ( s ) if ( not m ) : return ( None , None ) return ( m . group ( 1 ) , int ( m . group ( 2 ) ) )
extract slug and id from a string .