Hacker News new | past | comments | ask | show | jobs | submit login

Why not import the built-in functions too? The only thing not requiring import can be import.

  from python import def  # now you can def
That should be even easier to track things; now you don't have to deal with the difficulty of def not being defined anywhere in your code. It's traced to an import, which is telling you that def comes from python, liberating you from having to know that and remember it.



"def" is not a function. It's not even an identifier.


This exercise requires you to imagine a somewhat different Python in which you can (and must) do from python import def if you are to use def.


I mean, that would be Lisp, and in that context I wouldn't really have a problem with it.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: