Am 15.10.2009 um 23:24 schrieb Alan G Isaac:
OK, I'm not understanding this: `sum` will call `__add__` and that is well defined for paths, right?
Yes.
I hope you are not speaking against sum(mypaths, path()) because it is the only nice way I've found to turn a bunch of paths into subpaths of a single path.
Yes. It's fine. Note that this is quite different from extending the path __add__ operation to allow for 0 + mypath[0].
BTW note that sum is designed for numerics only. That's why sum([]) returns 0 and sum(["spam", "eggs"]) is not allowed. By the way for strings it even doesn't work with sum(["spam", "eggs"], ""), which I think is weird (but explicitly enforced by BDFL).
Anyway, sum(mypaths, path()) is fine. André -- by _ _ _ Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim / \ \ / ) [email protected], http://www.wobsta.de/ / _ \ \/\/ / PyX - High quality PostScript and PDF figures (_/ \_)_/\_/ with Python & TeX: visit http://pyx.sourceforge.net/
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference
_______________________________________________ PyX-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyx-user
