This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author andrei.avk
Recipients andrei.avk, cjw296, mariocj89, michael.foord, webisteme, xtreak
Date 2022-01-01.19:05:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641063929.21.0.270853113366.issue41403@roundup.psfhosted.org>
In-reply-to
Content
More generally, split()/rsplit() are probably the most common operations done on expected string at the start of a function, i.e. most likely to be triggered on the wrong type passed in. At the same time to many new users split()/rsplit() does not imply anything related to strings, and 'split' sounds too generic to expect explanatory results from google search. (although the first few results do point to the right explanation, and rsplit does seem like something that would return helpful search results).

I wonder if it would be helpful, especially for .split() (and rsplit for consistency), to add to the error msg: "... it's likely that a string object was expected instead of <type> object".
History
Date User Action Args
2022-01-01 19:05:29andrei.avksetrecipients: + andrei.avk, cjw296, michael.foord, mariocj89, xtreak, webisteme
2022-01-01 19:05:29andrei.avksetmessageid: <1641063929.21.0.270853113366.issue41403@roundup.psfhosted.org>
2022-01-01 19:05:29andrei.avklinkissue41403 messages
2022-01-01 19:05:29andrei.avkcreate