[Python-Dev] non-integer slice indices?

Greg Stein gstein@lyra.org
Sun, 13 Feb 2000 00:34:24 -0800 (PST)


On Sat, 12 Feb 2000, Finn Bock wrote:
>...
> What about getting full compatibility with jpython <wink> as motivation:
> 
> JPython 1.1 on java1.3.0rc1 (JIT: null)
> Copyright (C) 1997-1999 Corporation for National Research Initiatives
> >>> class A:
> ...    def __setitem__(self, idx, value):
> ...        print "__setitem__", `idx`, value
> ...
> >>> A()['a':'d'] = '1234'
> __setitem__ slice('a', 'd', 1) 1234
> >>>

Typically, CPython is the reference platform. This would indicate that
JPython has a bug.

Second, section 5.3.3 of the Language Reference states that the upper and
lower bound of a slice must be integers. Again, this would indicate that
JPython has a bug.

:-)

-- 
Greg Stein, http://www.lyra.org/