n. someone who enjoys pain, or who derives pleasure from harming oneself or being harmed by others
WordNet 3.0 Copyright 2006 by Princeton University. All rights reserved.
n. someone who obtains pleasure from receiving punishment
Word Usage
"If you go back to the DocBook V4. x DTDs and study the parameter entity structure [ "masochist" - ed], you'll find a few places where we twisted the parameter entity structure pretty hard to avoid exactly this problem."