A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-March/020999.html below:

[Python-Dev] "funny".split("")

[Python-Dev] "funny".split("") [Python-Dev] "funny".split("")Tim Peters tim@zope.com
Tue, 12 Mar 2002 15:09:22 -0500
Last time this went around on comp.lang.python (I hope nobody believes this
is a new discussion <wink>), my immediate gut reaction was that, *if*
splitting on an empty string had to do something, it should "obviously"
return the target string unchanged:  you didn't specify a sensible
separator, so nothing should get split.  This is the way re.split() works
too, given an empty "separator".

Other people think at least two other behaviors "are obvious" in this silly
case.  That makes raising an exception most Pythonic to me.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4