FAQ
Is there no such thing in Python as

mystring += "something" // C-style

A simple append-operator.

mystring = mystring + "something"

seems rather odd to me. (source of errors; typing mistakes)

(Please, e-mail!)
Peter
Peter H. Bittner
International Student at Aston University
e-mail: bittneph at aston.ac.uk
web: http://beam.to/bimbo
+--------------------------

Search Discussions

  • Aahz Maruch at Feb 14, 2000 at 9:28 pm
    In article <38A87064.BEB93BB7 at aston.ac.uk>,
    Peter Bittner wrote:
    Is there no such thing in Python as

    mystring += "something" // C-style
    No.
    --
    --- Aahz (Copyright 2000 by aahz at netcom.com)

    Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
    Hugs and backrubs -- I break Rule 6

    Have you coined a word today?
  • Fredrik Lundh at Feb 14, 2000 at 9:35 pm

    Peter Bittner 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).

    </F>

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedFeb 14, '00 at 9:15p
activeFeb 14, '00 at 9:35p
posts3
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase