[New-bugs-announce] [issue20380] __defaults__ changed by *args
Ram Rachum
report at bugs.python.org
Fri Jan 24 15:32:59 CET 2014
New submission from Ram Rachum:
Check the following example out. Putting *args in a function makes its __defaults__ be empty.
Python 3.4.0b2 (v3.4.0b2:ba32913eb13e, Jan 5 2014, 16:13:26) [MSC v.1600 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> def f(x, *args, y='meow'): pass
...
>>> f.__defaults__
>>> def g(x, y='meow'): pass
...
>>> g.__defaults__
('meow',)
>
----------
components: Interpreter Core
messages: 209085
nosy: cool-RR
priority: normal
severity: normal
status: open
title: __defaults__ changed by *args
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20380>
_______________________________________
More information about the New-bugs-announce
mailing list