-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Chris Withers wrote:
> Tres Seaver wrote: > >> On further consideration (and after some more profiling), I would >> actually prefer inlining the speedup code directly into >> OFS.Traversable.Traversable, to remove the extra function call as well >> as to avoid the gnarliness of monkey-patching Python. > > Fair enough :-) > >> An alternative >> would be to call 'quote' only once (for the completed string), rather >> than repeatedly (for each path element). > > Wouldn't that then encode all the /'es? No -- urllib.quote takes a 'safe' argument, which defaults to '/', as an extension to the 'always_safe' set:: $ python2.3 Python 2.3.5 (#2, Aug 30 2005, 13:43:24) [GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from urllib import quote >>> quote('/abc/def/ghi') '/abc/def/ghi' Tres. - -- =================================================================== Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDJqPx+gerLs4ltQ4RAqI4AKDEP6eiq/IzrYISuYM1AbJYAWQvWwCfXCYE 7AXqhMubzcfedZwO0Gr77x8= =o9gI -----END PGP SIGNATURE----- _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )