Hacker News new | ask | show | jobs
by mirashii 4764 days ago
There's no support for metaclasses. type is missing entirely. nonlocal doesn't work. docstrings and some other double underscore names are just missing (__class__, __name__, etc.). Unicode literals don't work. dis obviously won't work since there isn't a bytecode compilation step. Scoping, like in the following code, behaves improperly:

  x = 1  
  def test():  
      print(x)  
      x = 2
1 comments

I wonder if it's worth adding some failing tests to the project about these..
Things like this are why projects like pypy use CPython's test suite whereever the behavior is not CPython specific, and have contributed many tests back to CPython as well. These aren't minutia of the language, they are well understood and tested features that most moderately sized software projects are likely to rely on at some point.