You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To get the interval of a list object is handled inside the getitem built-in function. Since it only checks whether given parameter to this function is int or not, the slice objects enters the else statement which causes a problem. Possible Fix:
def __getitem__(self, expr):
if type(expr) is int or type(expr) is slice:
return list.__getitem__(self, expr)
else:
return Element(self, expr)
Thank you.
The text was updated successfully, but these errors were encountered:
To get the interval of a list object is handled inside the getitem built-in function. Since it only checks whether given parameter to this function is int or not, the slice objects enters the else statement which causes a problem. Possible Fix:
Thank you.
The text was updated successfully, but these errors were encountered: