Prolog-style unification?
Steven Taschuk
staschuk at telusplanet.net
Mon Jun 9 12:44:37 EDT 2003
Quoth Simon Burton:
> On Sat, 07 Jun 2003 14:38:40 -0600, junk wrote:
[...]
> > while Father(X,Y):
> > print X, Y
>
> Know about iterators?
>
> i'd like to see
> for x,y in Father():
> print x, y
It's not clear how you'd do any more complex query with such a
scheme. What if you want grandfathers of Seth, for example? The
original allows for the possibility of something like
Father(X, Y) & Father(Y, "Seth")
for example.
--
Steven Taschuk "[W]e must be very careful when we give advice
staschuk at telusplanet.net to younger people: sometimes they follow it!"
-- "The Humble Programmer", Edsger Dijkstra
More information about the Python-list
mailing list