Equivalent Legacy Law: IPC Section 340
BNS Section 127 deals with the legal rules and penalties for WRONGFUL CONFINEMENT. In simple terms: Preventing a person from leaving a specific bounded area (like locking them in a room).
Real-World Scenario
"Locking your classmate inside a classroom during recess and refusing to unlock the door."