Article snapshot taken from Wikipedia with creative commons attribution-sharealike license.
Give it a read and then ask your questions in the chat.
We can research this topic together.
The principle of legality was foremost in the underlying philosophy of the 1791 Code. In the spirit of the 1789 Declaration of the Rights of Man and of the Citizen, Cesare, Marquis of Beccaria summarized the principles that were to be the foundation of the procedural system. In his words, "every citizen should know what punishment he should endure." As a consequence, the function of the judge was conceived as being strictly distributive: qualification of an act, infliction of the pre-set sanction. This concept was revolutionary in 1791 and clearly departed from the arbitrary trials of the ancien régime. The Code of 1791 was straightforward in this respect; most definitions were clear, leaving little room to the interpretation of the judge. This principle was reincorporated in the NapoleonicPenal Code of 1810, which replaced this Code.
The Code did not enforce Catholic morality; there were, for example, no prohibitions against sodomy (this being the first Western code of law to decriminalize such conduct since Classical Antiquity). Its sponsor, Louis-Michel le Peletier, presented it to the Constituent Assembly saying that it only punished "true crimes", not the artificial offenses condemned by "superstition".