osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Please improve these comprehensions (was meaning of [ ])


https://www.youtube.com/watch?v=pNe1wWeaHOU&list=PLYI8318YYdkCsZ7dsYV01n6TZhXA6Wf9i&index=1
Thank you,
-Alex Goretoy
http://launchpad.net/~a1g


On Wed, Sep 6, 2017 at 7:22 PM, Stefan Ram <ram at zedat.fu-berlin.de> wrote:
> Rustom Mody <rustompmody at gmail.com> writes:
>>Because the abstract idea of a permutation is a list (sequence)
>
>   Traditional mathematical books (which are not influenced by
>   computer programming terminology) often use "n-tuple"
>   (or "sequence") instead of "list" IIRC.
>
>   It is important to note that - according to me - a Python
>   data structure with the same /name/ as a mathematical concept
>   does not always have to be the best way to implement that
>   mathematical concept. E.g., sometimes a Python list might be
>   the best way to implement a mathematical tuple, or a Python
>   tuple may be the best way to implement a mathematical set.
>
> --
> https://mail.python.org/mailman/listinfo/python-list