print "hello", >> file
Erik Max Francis
max at alcyone.com
Tue Feb 25 17:18:58 EST 2003
Jp Calderone wrote:
> On Tue, Feb 25, 2003 at 08:22:43PM +0000, phil hunt wrote:
>
> > Indeed. IMOv it's irrelevant whether += (or <<, or whatever) is
> > implemented by modifying an existing object or binding to a new one
> > -- that's just an implementation detail, of no more significance
> > bthan whether the underlying processor is a Pentium or ARM.
>
> No way. It -totally- matters. Imagine you have a Queue object you
> use to
> pass messages between two unrelated parts of your program. You could
> define
> += for this Queue to add new messages to it.
Since strings are immutable, it couldn't possibly work any other way.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ Grub first, then ethics.
\__/ Bertolt Brecht
Polly Wanna Cracka? / http://www.pollywannacracka.com/
The Internet resource for interracial relationships.
More information about the Python-list
mailing list