317. Whoever, being the father or mother of a child under the age of twelve years, or having the care of such child, exposes or leaves such child in any place with the intention of wholly abandoning such child, shall be punished with imprisonment for a term which may extend to seven years or with fine or with both.

Explanation—This section is not intended to prevent the trial of the offender for murder or culpable homicide, as the case may be, if the child dies in consequence of the exposure.