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

Try:

  import antigravity
and

  import braces 
separately.


Actually it is

  from __future__ import braces


There is also:

  from __future__ import print_function 
following which you can print output using the Python 3 print() function instead of the Python 2 print statement.

Also see:

https://stackoverflow.com/questions/7075082/what-is-future-i...

Note that all this is for Python 2.


That's cool! I didn't know about this one.

Also, just to make sure I understand the joke. It's basically just saying that they'll never add braces to the python syntax, right?


I mean, technically braces ARE part of Python syntax. They're used by sets and dictionaries.

But I know what you meant, and yeah...they'll never use braces as block delimiters. IMO, that's a good thing. Whitespace-as-syntax means you're FORCED to have a minimal level of decent code formatting or it doesn't work.


Oh yeah, thanks.

That also makes it more funny. :)


Don’t forget

    import this


Oh wow, yeah. The Zen of Python. Good reminder, thanks. Although some people think Python has strayed somewhat from that in recent years. Including me.




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

Search: