Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> On a side note "import GOTO" works in python :)

Never heard of this, and it doesn't work on my interpreter (tested with both 2.7 and 3.11). Are you sure it's not a third party package?



It indeed does not work. I was curious, and found this hilarious article "confirming" its existence: https://www.edureka.co/blog/goto-statement-in-python/ - it's complete nonsense and appears to have been written by ChatGPT.

The feature has been implemented a few times as a joke (more or less), e.g. https://github.com/snoack/python-goto/, but that one at least hasn't been updated for 5 years.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: