Error in Lists for heterogenous

Hi Team, Type Error in doc for Lists can also store heterogenous items along with homogenous items. [image: image.png] Kind Regards, Ajay Takur ✆ : +91-8801282523 ````````````````````````````` Use what you know. Do what you've always imagined.

Ajay, It is worth noting that the documentation says 'typically' - that is simply saying that it is normal to use a list with homogeneous data; it doesn't say 'must' or 'only'; i think that the word 'typically' is completely fine here - it would be pretty difficult to find any examples of production code that use lists with heterogeneous data. To be honest storing heterogenous data in a list is something that beginners will occasionally do, but will soon find that there are better solutions (such as using tuples, or skeleton classes) to holding related data of different types in a single list. The documentation doesn't specifically says that a list is only homogeneous (although I guess it doesn't say that a list can be heterogeneous). Should the documentation be explicit about heterogeneous data - maybe: I will let other people far more clever than me decide that. On 24/01/2022 08:43, kid games wrote:

Ajay, It is worth noting that the documentation says 'typically' - that is simply saying that it is normal to use a list with homogeneous data; it doesn't say 'must' or 'only'; i think that the word 'typically' is completely fine here - it would be pretty difficult to find any examples of production code that use lists with heterogeneous data. To be honest storing heterogenous data in a list is something that beginners will occasionally do, but will soon find that there are better solutions (such as using tuples, or skeleton classes) to holding related data of different types in a single list. The documentation doesn't specifically says that a list is only homogeneous (although I guess it doesn't say that a list can be heterogeneous). Should the documentation be explicit about heterogeneous data - maybe: I will let other people far more clever than me decide that. On 24/01/2022 08:43, kid games wrote:
participants (2)
-
anthony.flury
-
kid games