[Numpy-discussion] Python needs goto

Christophe Bal projetmbc at gmail.com
Thu Sep 24 07:25:16 EDT 2015


Hello.

Can you give an example where GOTO is useful ?
Le 24 sept. 2015 07:24, "Charles R Harris" <charlesr.harris at gmail.com> a
écrit :

> At last, goto for python <https://github.com/snoack/python-goto>!
>
> Usage:
>
> from goto import with_goto
>
> @with_goto
> def range(start, stop):
>     i = start
>     result = []
>
>     label .begin
>     if i == stop:
>         goto .end
>
>     result.append(i)
>     i += 1
>     goto .begin
>
>     label .end
>     return result
>
>
> HT: LWN
>
> Chuck
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> https://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150924/8bef3faf/attachment.html>


More information about the NumPy-Discussion mailing list