Michael Blahay <mbla...@gmail.com> added the comment:
Here is a test that more explicitly shows the problem. >>> from collections import UserList >>> UserList([0,1,2,3,4,5])[0:2].__class__ <class 'list'> >>> It can clearly be seen here that the return type of the slicing operator is list when it should, in this case, be UserList (or whatever class one is using that is derived from UserList). ---------- nosy: +mblahay _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue27639> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com