[issue20380] __defaults__ changed by *args

2014-01-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset fc32459495fc by Yury Selivanov in branch 'default': doc/inspect: Clarify docs for __defaults__, add docs for __kwdefaults__ #20380 http://hg.python.org/cpython/rev/fc32459495fc -- nosy: +python-dev ___ Py

[issue20380] __defaults__ changed by *args

2014-01-27 Thread Ram Rachum
Ram Rachum added the comment: I take your point and I agree. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20380] __defaults__ changed by *args

2014-01-27 Thread Yury Selivanov
Yury Selivanov added the comment: Ram, those are internal attributes. I.e. it's not recommended to use them directly, there are better instruments for that, such as 'inspect.signature'. Hence, I don't think that having an example/detailed explanation here is really necessary. --

[issue20380] __defaults__ changed by *args

2014-01-27 Thread Ram Rachum
Ram Rachum added the comment: Looks good. Ideally there would be a more details explanation and an example. -- ___ Python tracker ___

[issue20380] __defaults__ changed by *args

2014-01-27 Thread Yury Selivanov
Yury Selivanov added the comment: > Though perhaps a note in the documentation would be helpful for future > confused people. I agree. Also, __kwdefaults__ wasn't documented. Please take a look at the attached patch. -- keywords: +patch nosy: +yselivanov Added file: http://bugs.python

[issue20380] __defaults__ changed by *args

2014-01-24 Thread Ram Rachum
Ram Rachum added the comment: My mistake. Thanks for the clarification. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue20380] __defaults__ changed by *args

2014-01-24 Thread Ram Rachum
Ram Rachum added the comment: Though perhaps a note in the documentation would be helpful for future confused people. -- ___ Python tracker ___ _

[issue20380] __defaults__ changed by *args

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: That's because in f, y is after *args, so it is a keyword-only parameter. Its default value is in __kwdefaults__. If you move y to before *args, its default will be in __defaults__. This is working as designed. -- nosy: +larry resolution: -> invali

[issue20380] __defaults__ changed by *args

2014-01-24 Thread Ram Rachum
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 inf