[Python-ideas] str.split with padding

And Clover and-dev at doxdesk.com
Sat Mar 14 18:09:58 CET 2009

Georg Brandl wrote:

> Note that for maxsplit=1, you can use str.partition().

Indeed, though it does slightly spoil the cleanness of the unpacking 
assignment to include a dummy lvalue for the middle element.

[Thanks for the on-topic reply! I'm surprised more people haven't felt 
the need to write unpacking splits like this to be honest, but I guess 
engaging in SMTP syntax law is much more fun. Yes guys, I'm well aware 
of the capabilities of the RFC2822 addr-spec format, thanks, and no, 
it's not relevant to the particular program that example came from. 
Cheers for the concern though.]

And Clover
mailto:and at doxdesk.com

More information about the Python-ideas mailing list