Have you noticed that no other animal attacks with violence their offspring?
Punish or not the children is a question that always goes through the minds of parents in the hours of education. But some parents are unable to discern "educate to learn what is right "and "educate under distress"and the distress occurs when the child is replaced by minor trauma to the bad teachings of your parents.
The education starts when children are small. The goal is to teach boundaries and not simply punish, as many do not know what they are doing.
The children needs to understand the reason for the punishment and did not they are being punished for authoritarianism or irritation of adults. The young child should be reprimanded immediately after the misbehavior. For example, if the child tries to put a finger in the socket or climb dangerous place, parents should do "ugly face" to show that this attitude is not right and explain that "can not" doing it because may feel pain or get hurt.
Punishment, when necessary, should be a simple punishment, get and take the toy, prohibit from leaving the bedroom, no watching TV..., and make understand why "it not can". Whenever a punishment, say why this punishing and listen to what the children says, this will help them make understand why you say "not"
Establish goals to retrieve a toy, for example, is a good solution to reverse the penalty, giving the child the satisfaction by making the right thing and understand so what you taught.