osdir.com


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

Please improve these comprehensions (was meaning of [ ])


On Tuesday, September 5, 2017 at 7:32:52 PM UTC+5:30, Chris Angelico wrote:
> On Tue, Sep 5, 2017 at 11:49 PM, Rustom Mody wrote:
> > Pop et al wont work with frozen sets
> > Containment wont work with sets ? what mathematicians call 'not closed'
> > All of which amounts to this that python sets are not really pleasant for
> > math-work
> 
> Funnily enough, Python has never boasted that it's great for
> mathematicians. 

True that

> Time and time again I see posts here that try to
> explain Python from the POV of pure mathematics, and they always seem
> to end up getting convoluted and awkward.

Unrelated that.
Look at all the fundamental operations here
https://docs.python.org/3.6/library/operator.html

What percentage of these are unrelated to math?

And how do you write even the simplest assignment statement without a
(mathematical) expression on the rhs?

And a look at history:
What *were* Turing, Church, von Neumann, even Knuth by training? Mathematicians or CS-ists?

And what *are* the contributions of Turing, Church, von Neumann, Knuth to CS?