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

2014-04-22 Thread Leandro Pereira de Lima e Silva
differences between lists and tuples. > > > > > > On Thu, Apr 17, 2014 at 11:49 AM, Brett Cannon > wrote: > >> > >> > >> > >> On Thu Apr 17 2014 at 2:43:35 PM, Leandro Pereira de Lima e Silva > >> wrote: > >>>

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

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

2014-04-17 Thread Leandro Pereira de Lima e Silva
; > On Thu, Apr 17, 2014 at 11:49 AM, Brett Cannon 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 stumb

[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 c