bmeaut / python_nlp_2018_spring

MIT License
8 stars 10 forks source link

Q3 Inheritance #3

Closed Dudly01 closed 6 years ago

Dudly01 commented 6 years ago

Hi, my question is whether I can inherit my class from list, like: class MutableString(list): or do i have to stick with class MutableString(object): Thanks in advance!

In hindsight, not really relevant question

juditacs commented 6 years ago

It's not a list, so you shouldn't inherit from list.

gaebor commented 6 years ago

https://stackoverflow.com/questions/9432719/python-how-can-i-inherit-from-the-built-in-list-type