On Mon, 20 Jul 2020 at 03:26, Jonathan Goble <jcgob...@gmail.com> wrote:
>> One use case that comes up in xarray and pandas is support for indicating 
>> indexing "modes". For example, when indexing with floating point numbers 
>> it's convenient to be able to opt-in to approximate indexing, e.g., 
>> something like:
>> array.loc[longitude, latitude, method='nearest', tolerance=0.001]
>
>
> I had to stare at this for a good 30 seconds before I realized that this 
> wasn't a function/method call. Except for the square brackets instead of 
> parentheses, it would be.
>
> Honestly, this whole idea smells to me like just wanting another type of 
> function call with different semantics.

I agree and in fact it was a very weak point. The main point, in my
opinion, would be axis naming. Whatever the term "axis" means. In the
case of an array, it can be obvious. In the case of the starting mail,
axis is basically the degree of freedom of customisation of a typing
class.



-- 
Kind regards,

Stefano Borini
_______________________________________________
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/IGFJK7S5YGD22Z2SQV3OZXYIETM6VDBH/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to