Stefan Behnel added the comment: Python 3.4.0b3+ (default:19d81cc213d7, Feb 1 2014, 10:38:23) [GCC 4.8.1] on linux Type "help", "copyright", "credits" or "license" for more information. >>> def test(a,b,c=None): pass >>> set(dir(test)) - set(dir(len)) {'__get__', '__code__', '__globals__', '__dict__', '__defaults__', '__kwdefaults__', '__annotations__', '__closure__'} >>> test.__kwdefaults__ >>> test.__defaults__ (None,) >>> test.__annotations__ {} >>> test.__code__ <code object test at ..., file "<stdin>", line 1> >>> dir(test.__code__) ['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'co_argcount', 'co_cellvars', 'co_code', 'co_consts', 'co_filename', 'co_firstlineno', 'co_flags', 'co_freevars', 'co_kwonlyargcount', 'co_lnotab', 'co_name', 'co_names', 'co_nlocals', 'co_stacksize', 'co_varnames'] >>> test.__code__.co_varnames () >>> test.__code__.co_varnames () >>> test.__code__.co_varnames ('a', 'b', 'c') >>> test.__code__.co_kwonlyargcount 0 >>> test.__code__.co_name 'test'
But again, this is not covered by the subject of this ticket. I also don't think it's a good idea to delay Py3.4 until this discrepancy is fixed. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17159> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com