string.replace
Gordon McMillan
gmcm at hypernet.com
Thu Jul 22 19:07:34 EDT 1999
More information about the Python-list mailing list
Thu Jul 22 19:07:34 EDT 1999
- Previous message (by thread): string.replace
- Next message (by thread): Q: anyone running Python on OS X server?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
marlon asks:
> can anyone tell me why this breaks?
>
> Python 1.4 (Nov 4 1997) [GCC 2.7.2.3]
^^^
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> import sys, string
> >>> line = 'cat "in" the hat'
> >>> line = string.replace( line, '"', '')
> Traceback (innermost last):
> File "<stdin>", line 1, in ?
> AttributeError: replace
> >>>
I believe string.replace came with 1.5.
- Gordon
- Previous message (by thread): string.replace
- Next message (by thread): Q: anyone running Python on OS X server?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list