Alan is not incorrect here (Python doesn't *natively* run in browser), but
these days that's an increasingly meaningless distinction (even if we aren't
there *yet*!). There are a couple of approaches to running Python in browser:
* Transpilation approaches like Brython:
https://brython.info/sta
In addition to the other answers:
Libraries like NumPy define a helper factory for slices, e.g.
```python
>>> import numpy as np
>>> np.s_[1:10]
slice(1, 10, None)
```
You can do the same in your library. Equally, you don't have to return a slice
— you might want to return a "Range" object as m
To pile on, if you are looking for help learning Python, there is
another mailing list called [email protected]. They will be much
more supportive with answering your questions. There is also a community
on Reddit called r/learnpython that is very supportive. This mailing
list is for proposing
On 12Aug2021 17:45, Ricky Teachey wrote:
>and of course native python sequences already have far better syntactic
>sugar than ellipses:
>
>[][3:]
>[][::-1]
>
>etc etc.
>
>So given that, why would we ever want to use ellipses?!?!
I've got an I/O module where the take(n) call accepts an Ellipsis to
On 12Aug2021 14:05, [email protected] wrote:
>This is how slices are used in the python standard library, indeed, but that
>does not stop me from interpreting the slices as "inclusive by default" in my
>library.
>The inconsistency with the rest of the python standard library could be
>mi