Phillip J. Eby wrote: >> Check out (and Pythonify) the ANSI M[UMPS] $PIECE(). See: >> http://www.jacquardsystems.com/Examples/function/piece.htm > > As far as I can see, either you misunderstand what partition() does, or > I'm > completely misunderstanding what $PIECE does. As far as I can tell, > $PIECE > and partition() have absolutely nothing in common except that they take > strings as arguments. :)
both split on a given token. partition splits once, and returns all three parts, while piece returns the part you ask for (the 3-argument form is similar to x.split(s)[i]) </F> _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com