On Mon, 16 Mar 2020 at 04:51, Kyle Stanley <aeros...@gmail.com> wrote:
> PEP 8 itself is very far from a definitive authority. Its scope is 
> specifically intended to cover CPython stdlib development, not all uses of 
> Python.

Yes, I know. But it's a common convention, and Python relies often on
conventions. For example, the underscore at the start of a variable.

I mean, this breaks duck typing. I expect the object to quack, and
instead it roars. And this is because

bool(my_numpy_array == 42)

should return True if the standard is followed, even if _no_ element
of `my_numpy_array` is equal to 42.
Indeed it looks strange... but this is
because they changed the __eq__() operator too! They could simply add
another method or use another operator, as they did for matrix
multiplication. This way it was clear that they are _not_ returning a
boolean, but
an ndarray.

I can't bet on it, but I will surprised if someone propose a similar
behavior for some new data object in CPython and the PEP will be not
rejected.

The problem is that NumPy is so much popular that changing this
"feature" would be a disaster. But IMHO this is no more Python. They
created another language and a disjointed ecosystem. I knew many
scientists that knows only NumPy and SciPy. They have little knowledge
of the rest of Python.

Furthermore they usually uses Anaconda, with the conda package
manager. I don't know them very well, since I do not use it, but conda
seems to use a very strange method for managing the packages. It's all
o, until you install packages from the conda repo, but, if you want to
install some package from Pypi that is not in conda repo, it could be
a mess...

Finally, Anaconda it's commonly used with Spyder, that is a good IDE
IMHO. The problem is it integrates Jupyter in the text editor by
default, so their "code" is a mix of numpy+scipy code with IPython
magic words.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/2YTO3U7ESEGG7QDGDU5L6JAT4SEGFYZV/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to