zip() : how about braid()

Pete Shinners pete at visionart.com
Thu Jul 20 19:29:34 EDT 2000


"Peter Schneider-Kamp" <peter at schneider-kamp.de> wrote
> > >>> marry([1,3,5],[2,4,6])
> > ([1, 2], [3, 4], [5, 6])
> > >>> divorce([1,2,3,4,5,6])
> > ([1, 3, 5], [2, 4, 6])
>
> <excited>
> I absolutely truly *LOVE* this. That's great.
> Man, you made my day!
> </excited>
>
> zip() / unzip() sounds just so technical.


ah, but how would divorce always know how to best
separate the list? i suggest the marry function takes
an optional second argument, "prenuptual"

this way when marriage is made with a prenuptual,
the divorce goes much more smoothly.
of course, if marry() never expects to be followed
with a divorce() there is little need for the prenup.







More information about the Python-list mailing list