News for hackers. Stuff that matters.
Re:The PEPs of Python 3.9 by throwaway287391 on Thursday May 28, 2020 @09:21PM (#23345265)
> Slicing in Python always create a new object.

Since you said "always", I'll be "that guy"...

For the builtin types, yeah. But not in general; user code can do whatever it wants:

    class MyType:
      def __getitem__(self, *args):
        return self
    my_obj = MyType()
    my_other_obj = my_obj[3:7]
    assert my_other_obj is my_obj

There are no comments on this comment yet.