Modify a string's value
Ben Finney
bignose+hates-spam at benfinney.id.au
Wed Jul 16 00:55:54 EDT 2008
s0suk3 at gmail.com writes:
> I just came across this unusual situation where I'd like to modify a
> string passed to a function
Again: Why? The normal way to do this is to create a new string and
return that.
> which seems impossible since Python passes arguments by value.
No, Python passes arguments by reference
<URL:http://effbot.org/zone/python-objects.htm>.
--
\ “For of those to whom much is given, much is required.” —John |
`\ F. Kennedy |
_o__) |
Ben Finney
More information about the Python-list
mailing list