Devils advocate: If you make this a strict requirement for your code base people write wrappers all the time, which creates a huge mess: def newMethod(x): if x*2 == 42: return 36 return oldMethod(x) You cannot enforce the requirement anyway, because people will just copy-paste the code and edit it under a new name. You just cannot push this methodology unto developers.
def foo_with_edge_case(x):
if x == EDGE_CASE:
return 36
return foo(x)
seems clearer to me than stuffing the edge case handling into the foo method