Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialHanwen Zhang
20,084 PointsHelp, subclass in Python, I don't see the parent class in the video
class FilledList(list): class JavaScriptObject(dict):
There are two class code in the video but I don't see where are the class list and class dict, where do they come from and how do they use as a parent class?
1 Answer
Peter Vann
36,427 PointsHi Hanwen!
Lists and dictionaries (dict) are native Python data type/structures.
More info:
https://docs.python.org/3/tutorial/datastructures.html
https://thomas-cokelaer.info/tutorials/python/data_structures.html
https://www.w3schools.com/python/python_lists.asp
https://www.w3schools.com/python/python_dictionaries.asp
Further info:
https://www.w3schools.com/python/python_tuples.asp
https://www.w3schools.com/python/python_sets.asp
I hope that helps.
Stay safe and happy coding!
Hanwen Zhang
20,084 PointsHanwen Zhang
20,084 PointsThank you peter