[Edu-sig] re: Does edu-sig extend to Jython

Dethe Elza delza@mac.com
19 Aug 2002 12:07:17 -0700


Arthur,

Don't be too quick to take this off-list.  While your situation is
pretty specific, the general case of "why doesn't Python support feature
X of language Y" seems to be appropriate here.  There are several
possible answers, all valuable in an educational context:

1) It does support X, but the python idiom looks like X()
2) X isn't needed because of python feature Z
3) Python doesn't support X because X is a bad idea for such and such a
reason
4) Python doesn't support X, but you can do Z to simulate it

etc.

In your case, if both Line and Point have methods getHalfIntersection(),
could you then have:

def intersection(first, second):
  return first.getHalfIntersection() * second.getHalfIntersection()

where "*" is replace with the real operation or set of operations needed
and getHalfIntersection is replaced with whatever is specific to lines
and/or points?

--Dethe