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 mrabarnett
Recipients Elias Tarhini, ezio.melotti, mrabarnett
Date 2019-03-22.03:26:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1553225191.49.0.422515007837.issue36397@roundup.psfhosted.org>
In-reply-to
Content
From the docs:

"""If capturing parentheses are used in pattern, then the text of all groups in the pattern are also returned as part of the resulting list."""

The pattern does contain a capture, so that's why the result has additional '1' and '2'.

Presumably, Java's split doesn't do that.

Not a bug.
History
Date User Action Args
2019-03-22 03:26:31mrabarnettsetrecipients: + mrabarnett, ezio.melotti, Elias Tarhini
2019-03-22 03:26:31mrabarnettsetmessageid: <1553225191.49.0.422515007837.issue36397@roundup.psfhosted.org>
2019-03-22 03:26:31mrabarnettlinkissue36397 messages
2019-03-22 03:26:31mrabarnettcreate