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

Why, it just should be opt-in:

  from __future__ import no_bare_except
...and enjoy.


Python should have the ability to set per-module flags for these kinds of incompatibilities.

I guess that __future__ is doing something similar, but I am thinking of something like declaring how options should be set for your module and then only the code in that module is affected. (It would be nice being able to set constraints on what options your dependencies can enable)

I guess that for std functionality this is impossible (like if the dict changed its key sorting it might be too hard to dispatch on the original file) but for syntax it should be perfectly possible.




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

Search: