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 algorithm, same outcome >> or: >> SELECT DISTINCT line FROM somelines ORDER BY line;
> I think that it helps by making the learning curve less steep, > although it also has the potential to produce poor code because > different languages may have different idioms to solving different > problems. True, of course. I think what Raymond is saying is that these other-language examples can help smooth over those "¿Qué pasa?" moments, so the teacher can focus on style and idiomatic coding in the language at hand. Some teachers will use them more than others do. On the other hand, there's no need to purge them from the docs and tutorials. If someone notices that some example/analogy seems likely to get in the way of understanding, they can and should write a patch to improve that example. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com