error in string module documentation?

Michael Anckaert xantor at linux.be
Sat Apr 19 04:22:35 EDT 2003


Hello all,
In the string module documentation I read the following:


lstrip(s[, chars])
        Return a copy of the string with leading characters removed. If
        chars is omitted or None, whitespace characters are removed. If
        given and not None, chars must be a string; the characters in
        the string will be stripped from the beginning of the string
        this method is called on.
        
But I get the following error from my program:

  File "./game.py", line 35, in run_game
    item = string.lstrip(cmd, "look")
TypeError: lstrip() takes exactly 1 argument (2 given)

Is there an error in the documentation or is it my error?

-- 
Greetings,
Michael Anckaert, aka The XanTor
OpenPGP key: F7A6C3AB
Fingerprint: A329 43FC 3953 A944 5DDC  2E05 8E5D AD60 F7A6 C3AB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/python-list/attachments/20030419/298c6b3f/attachment.sig>


More information about the Python-list mailing list