A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-April/134242.html below:

[Python-Dev] List vs Tuple / Homogeneous vs Heterogeneous

[Python-Dev] List vs Tuple / Homogeneous vs Heterogeneous / Mutable vs Immutable [Python-Dev] List vs Tuple / Homogeneous vs Heterogeneous / Mutable vs ImmutableStephen J. Turnbull stephen at xemacs.org
Tue Apr 22 19:41:17 CEST 2014
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.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4