Personally, I think it depends on the program. If the two inheriting classes would be implemented substantially differently, then definitely go with inheritance. If the differences are fairly small, then I'd go with your second solution, though I'd probably wrap the constants into the class as class attributes, like so:
class Child(object):
MALE=1
FEMALE=2
def __init__(self, gender):
self.gender=gender
def doSomething(self):
if self.gender==Child.MALE:
print 'male'
elif self.gender==Child.FEMALE:
print 'female'
else:
print 'error'
boy=Child(Child.MALE)
boy.doSomething()
I think that way achieves better encapsulation, and if nothing else it avoids cluttering up your namespaces a bit.
(And, as an aside, you should probably start getting in the habit of using new style classes (i.e inheriting everything from object, if it isn't inheriting anything else) instead of old-style as you're using now.