He studied law , history and mathematics at Graz University . After he finished his study , Sacher-Masoch moved back to Lemberg where he became a professor . He studied law , history and mathematics at Graz University , and after graduating moved back to Lemberg where he became a professor .