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

the zen of python was written in the 90s.

from that context it makes sense, because the only goal of python in the 1990s was to be more popular than perl, which was notorious in having many ways of doing the same thing.

but yeah, python had had significant feature creep over the years, it's nowhere near the small clear lang it used to be.



And still no expressive switch/case statement, breaking out of loops and ending scripts early (for explorative programming).


>no expressive switch/case statement

match/case (not a drop in switch statement)

>breaking out of loops

  break
>ending scripts early (for explorative programming)

  exit() or sys.exit()


I think by breaking out of loops they meant breaking out of nested loops.


Exit or sys exit kills the kernel, so for explorative programming in like spyder it is not that useful.


Are you looking for breakpoint()?


> And still no expressive switch/case statement

There's match/case in 3.10 - https://www.python.org/dev/peps/pep-0636/




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

Search: