Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Python has exactly 6 primitive data types (well, actually just 5, but we’ll get to that). 4 of these are numerical in nature, and the other 2 are text-based. Let’s talk about the text-based first, because that’s going to be much simpler.

What is your definition of a primitive data types? All of these have object as a superclass, so I wouldn't call them primitive data types in python.

Maybe there is just 1 primitive type: type? Or none at all?



In my case I meant it as things that only extend from object. Kinda like how prime numbers only have two factors including themselves.


What about list, dict, set, tuple, range and map then?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: