This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Frederick Wagner
Recipients Frederick Wagner
Date 2016-02-12.03:33:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455247989.9.0.159596346531.issue26347@psf.upfronthosting.co.za>
In-reply-to
Content
[First-time contributor, feedback appreciated.]

Found and fixed some unexpected behavior in inspect.BoundArguments.apply_defaults. Simplest explanation is the following test that I added:

        # Make sure a no-args binding still acquires proper defaults.
        def foo(a='spam'): pass
        sig = inspect.signature(foo)
        ba = sig.bind()
        ba.apply_defaults()
        self.assertEqual(list(ba.arguments.items()), [('a', 'spam')])

I've included the patch file; is there anything else I can do?
History
Date User Action Args
2016-02-12 03:33:09Frederick Wagnersetrecipients: + Frederick Wagner
2016-02-12 03:33:09Frederick Wagnersetmessageid: <1455247989.9.0.159596346531.issue26347@psf.upfronthosting.co.za>
2016-02-12 03:33:09Frederick Wagnerlinkissue26347 messages
2016-02-12 03:33:09Frederick Wagnercreate