A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-February/051643.html below:

[Python-Dev] Negative indices in UserString.MutableString

[Python-Dev] Negative indices in UserString.MutableString [Python-Dev] Negative indices in UserString.MutableStringWalter Dörwald walter at livinglogic.de
Thu Feb 17 23:22:20 CET 2005
Currently UserString.MutableString does not support negative indices:

>>> import UserString
>>> UserString.MutableString("foo")[-1] = "bar"
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/home/Python-test/dist/src/Lib/UserString.py", line 149, in __setitem__
    if index < 0 or index >= len(self.data): raise IndexError
IndexError

Should this be fixed so that negative value are treated as being relative to the end?

Bye,
   Walter Dörwald



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4