string issue

Reinhold Birkenfeld reinhold-birkenfeld-nospam at wolke7.net
Mon Feb 7 14:49:05 EST 2005


Alex Martelli wrote:

> So, *WHAT ON EARTH* could possibly
> make this weird 'x[:]' form preferable to 'x*1'?!  It's MUCH more
> obvious that the second one returns an independent, separate object
> initially equal to x

.>> x = 2
.>> y = x*1
.>> x is y
True
.>>

just-kidding-ly yours,

Reinhold



More information about the Python-list mailing list