Re: [Python-Dev] List vs Tuple / Homogeneous vs Heterogeneous / Mutable vs Immutable

2014-04-22 Thread Leandro Pereira de Lima e Silva
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

Re: [Python-Dev] List vs Tuple / Homogeneous vs Heterogeneous / Mutable vs Immutable

2014-04-22 Thread Leandro Pereira de Lima e Silva
their own programs where this issue comes up -- before they're wizards but well after they have learned the semantic differences between lists and tuples. On Thu, Apr 17, 2014 at 11:49 AM, Brett Cannon bcan...@gmail.com wrote: On Thu Apr 17 2014 at 2:43:35 PM, Leandro Pereira de

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

2014-04-17 Thread Leandro Pereira de Lima e Silva
Hello there! I've stumbled upon this discussion on python-dev about what the choice between using a list or a tuple is all about in 2003: 1. https://mail.python.org/pipermail/python-dev/2003-March/033962.html 2. https://mail.python.org/pipermail/python-dev/2003-March/034029.html There's a vague

Re: [Python-Dev] List vs Tuple / Homogeneous vs Heterogeneous / Mutable vs Immutable

2014-04-17 Thread Leandro Pereira de Lima e Silva
, Brett Cannon bcan...@gmail.com wrote: On Thu Apr 17 2014 at 2:43:35 PM, Leandro Pereira de Lima e Silva leandro...@cpti.cetuc.puc-rio.br wrote: Hello there! I've stumbled upon this discussion on python-dev about what the choice between using a list or a tuple is all about in 2003: 1