Difficulty with maxsplit default value for str.split

Paul Rubin http
Mon Sep 25 10:36:57 CEST 2006

Steven D'Aprano <steve at REMOVE.THIS.cybersource.com.au> writes:
> Is it safe for me to pass -1 as the default to maxsplit, meaning
> "unlimited splits"? Should the docs be fixed to mention that?

Frederik gave a simple and practical solution to your immediate
problem, but yes, I think the docs should be fixed after checking the

More information about the Python-list mailing list