A problem with re.split()

Jeff Epler jepler at inetnebr.com
Wed Jun 2 16:36:03 CEST 1999


import re
def resplit(pat, str):
	"""Emulate perl braindamage at the cost of an extra function
	call"""
	if not pat: return map(None, str)
	else: return re.split(pat, str)

Jeff
-- 
\/ http://www.redhat.com/                        Jeff Epler jepler at inetnebr.com
Hey, what do you expect from a culture that *drives* on *parkways* and
*parks* on *driveways*?
		-- Gallagher




More information about the Python-list mailing list