Because of the length, I am including this as a separate answer:
As far as a death penalty for studying forbidden topics, the Lechem Mishneh commentary on the Rambam writes that there is no actual death penalty in this case, whether judicial or divine. He writes that it is a non-literal, rabbinic "death penalty" (Hil. Melachim, 10:9; see ad loc where he writes that there are other places [e.g. Hil. Melachim, 10:6] where the death penalty is figurative).
Presumably he means that a figurative death penalty was mentioned in order to convey the significance of the Torah as God's special and intimate bond with the Jewish people (B'rachos 57a), and the gravity of violating that bond. That is why, according to the Rambam, in a time and place where rabbinic courts had legal jurisdiction over the populace, non-Jews who were convicted of studying forbidden topics were liable to be severely chastised and punished by the court, or even flogged (Hil. Melachim, 10:9).
The seemingly hyperbolic choice of words is consistent with the Talmudic approach of emphasis through exaggeration (see Tamid 29a; see also examples from Sotah 10b and Yerushalmi, Pe'ah 4a). In fact, Tosafos discuss a Talmudic statement that a certain act carries a heavenly death penalty, and conclude that the usage of the term "death penalty" in that context is non-literal and "merely symbolic" (Rosh HaShanah 12a, s.v. Tana d'Rabbanan).
Mind you, there are prohibitions that carry an actual heavenly death penalty (see Sanhedrin 83a for a list), though such a penalty is not irrevocable. Unlike with a judicial death penalty, sincere repentance can absolve one of kareis (lit. excision, this punishment is interpreted in different ways) or a divine death penalty (Makkos 13b).