String manipulation

Fredrik Lundh effbot at
Mon Feb 14 16:35:21 EST 2000

Peter Bittner <bittneph at> wrote:
> Is there no such thing in Python as
>   mystring += "something"     // C-style

no.  python's not C.  python strings cannot be modified
in place.  in python, assignment is a statement, not an
operator.  etc.

(for more arguments pro and con, check the newsgroup
archives.  summary: it may be added some day, but there
are lots of stuff that are much more important...)

> (source of errors; typing mistakes)

have you just started using Python?

if so, come back in three months and tell us if you still
think this is a real problem (chances are that your list
of "real problems" will look very different -- see neel's
post for an example)

(if you've been using python for quite a while, check
the archives before replying).


More information about the Python-list mailing list