> def add_name(self):
> try:
> self.name = SPECIALIZED_SQLcall_for_child()
> except SpecialSQLError:
> #default to the superclass's add_name method
> super(Child, self).add_name()
>
That certainly is a lot easier to read. So if I were to go that route,
would my "SPECIALIZED_SQLCall_for_child()" function (I've slightly
renamed it) have to resemble something like below?:
def SpecialSQLcall_for_child():
result = execute some sql_for_special_case()
if type(result) != str:
raise SpecialSQLError
else:
return result
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor