From: Alexandre Duret-L. <ad...@us...> - 2003-12-26 03:18:20
|
[You lost gra...@li... again.] Season's greetings >>> "Don" == Don Allingham <don...@co...> writes: Don> Alexandre, Don> I just checked a fix for this into CVS. It was incorrectly doing a Don> comparison that was ignoring the "Unknown" case. It checked to make sure Don> the father was not female instead of checking if the father was a male. (You meant the converse, I hope!) Don> This caused the unknown case to fail. A similar problem existed for the Don> mother. Thanks. However this will fix only the first of the two problems I reported. Check.py still has: if type != "Partners": if father.getGender() == mother.getGender(): family.setRelationship("Partners") self.fam_rel.append(family) which does not handle the case where both genders are unknown (in which case the relationship should not be forced to "Partners" IMO). While I was looking at check_parent_relationships, I've seen to oddities I though I might mention. 1. if father == None or mother == None: continue does this mean that if only one parent is known, no check is performed? (e.g., mother is unknown, and father mistakenly points to a woman) 2. if type != "Partners": [...] else: if father.getGender() != mother.getGender(): family.setRelationship("Unknown") self.fam_rel.append(family) if father.getGender() == RelLib.Person.female: family.setFather(mother) family.setMother(father) This caught my eye because the check is asymmetric. A "Partners" family where the father is a female and the mother has unknown gender will be fixed, however a a "Partners" family where the father has unknown gender and a mother is male will not be fixed. I believe the test should be if father.getGender() == RelLib.Person.female or mother.getGender() == RelLib.Person.male: -- Alexandre Duret-Lutz http://www.dickalba.demon.co.uk/usenet/guide/faq_topp.html http://www.cs.tut.fi/~jkorpela/usenet/brox.html http://www.caliburn.nl/topposting.html |