New issue 2719: Difference between CPython and PyPy - using getattr with keyword arguments https://bitbucket.org/pypy/pypy/issues/2719/difference-between-cpython-and-pypy-using
adamtheturtle: In CPython, `getattr` cannot take keyword arguments. In PyPy, `getattr` can take keyword arguments. ``` Adam@MacBook-Pro ~/Desktop> python3 Python 3.6.4 (default, Dec 19 2017, 15:26:29) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> Adam@MacBook-Pro ~/Desktop> pypy3 Python 3.5.3 (d72f9800a42b46a8056951b1da2426d2c2d8d502, Oct 07 2017, 08:21:37) [PyPy 5.9.0-beta0 with GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] on darwin Type "help", "copyright", "credits" or "license" for more information. And now for something completely different: ``what we achieved today: we discussed the ponyness of time-machines'' >>>> Adam@MacBook-Pro ~/Desktop> python3 -c 'getattr(object="a", name="title")' Traceback (most recent call last): File "<string>", line 1, in <module> TypeError: getattr() takes no keyword arguments Adam@MacBook-Pro ~/Desktop> pypy3 -c 'getattr(object="a", name="title")' Adam@MacBook-Pro ~/Desktop> ``` _______________________________________________ pypy-issue mailing list pypy-issue@python.org https://mail.python.org/mailman/listinfo/pypy-issue