hi paul, thank you for the hints... that's the way I will do the stuff in future. I've eaten to much C in my younger years, I guess.;-) cheers, maik Paul Winkler wrote:
On Tue, Aug 20, 2002 at 07:01:02AM -0700, Paul Winkler wrote:
return context.title.split('#')[1]
... and to follow up on your latest discovery - always do error checking - I'd do it like this:
try: title_parts = context.title.split('#', maxsplit=1)[1] return title_parts[1]
except IndexError: # there is no '#' in the title return title
--
Paul Winkler "Welcome to Muppet Labs, where the future is made - today!"
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- Maik Jablonski __o www.zfl.uni-bielefeld.de _ \<_ Deutsche Zope User Group Bielefeld, Germany (_)/(_) www.dzug.org