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

This is a new syntax, so it is opt-in. The new syntax can be conceived as syntax sugar that lets you rewrite

  def my_func():
      import my_mod
      my_mod.do_stuff()
as

  lazy import my_mod
  def my_func():
      my_mod.do_stuff()

Ie, with lazy, the import happens at the site of usage. Since clearly this is code that could already be written, it only breaks things in the sense that someone could already write broken code. Since it is opt in, if using it breaks some code, then people will notice that and choose not to rewrite that code using it.


This is already addressed in my comment above.




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

Search: