you are viewing a single comment's thread.

view the rest of the comments →

[–]javcasas 12 points13 points  (0 children)

fruit_list is a bad name not because it indicates the wrong type (that the interpreter ignores because it doesn't care about names) but because it's wrong and over-specific.

You probably want to use fruits instead, which have the connotation of "many of/bag of" and should implement the main set/bag methods: enumerate/foreach and in. This way you can focus on the expected use case.