>
> In teaching Python, I find that analogs to other languages are helpful
> in explaining Python even if a person doesn't know the other language.
> sorted(set(open(somefile)))
> is like:
> cat somefile | sort | uniq # different algorithm, same outcome
> or:
>SELECT DISTINCT line
That's rather vague, isn't it? "Usually contains" isn't nearly as
prescriptive as "should be used for".
A co-worker with whom I discussed the matter these days also argued that a
language shouldn't prescribe as one uses a data structure, although I do
think conventions in semantics helps maintaina
Leandro Pereira de Lima e Silva writes:
>> In teaching Python, I find that analogs to other languages are
>> helpful in explaining Python even if a person doesn't know the other
>> language.
>> sorted(set(open(somefile)))
>> is like:
>> cat somefile | sort | uniq # different al