No, it's social safety quarantine. If you just want to punish someone, there are much cheaper and more effective ways (e.g. caning)