I would understand if they were saying a sexist joke or saying a joke that perpetuated some stereotype but all they were doing was saying a stupid joke about dongles and forking. How could that offend anyone that wasn't looking to be offended?
Whether pycon is a professional context really depends on whose dime and at whose behest you are attending it, no? I don't know the details of this case. In any event, it's probable that PyCon has a harassment policy that could be interpreted as to bar sexual jokes around people who don't want to hear them, but I don't know for sure.
Also, although these jokes were sexual in nature, they did not have anything to do with sexualizing women, putting down anyone from any sex, or targeting anyone in particular as the butt of the joke. And seeing as how these jokes were not intended to hurt or upset anyone or where in any way threatening or disturbing I don't see how it could constitute harassment.