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 zzzeek
Recipients zzzeek
Date 2014-03-02.15:10:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1393773047.92.0.816306226616.issue20828@psf.upfronthosting.co.za>
In-reply-to
Content
this appears like it may be related to http://bugs.python.org/issue20786, at least in terms of inspect.getargspec() seems to be returning answers in 3.4 where it used to raise TypeError, however like in 20786 it's again returning the wrong answer.  I'm a little concerned that some change was made to allow inspection of lots of builtins that wasn't before, but the argument lists haven't been checked.

test case:

import inspect
import datetime

try:
    insp = inspect.getargspec(datetime.datetime.today.__call__)
except TypeError:
    pass
else:
    print(insp)
    assert insp == (["self"], "args", "kwargs", None)

    # claims to accept "args" and "kwargs", ok let's try...
    datetime.datetime.today.__call__(1, 2, foo='bar')

    # raises:
    # TypeError: today() takes no keyword arguments
History
Date User Action Args
2014-03-02 15:10:47zzzeeksetrecipients: + zzzeek
2014-03-02 15:10:47zzzeeksetmessageid: <1393773047.92.0.816306226616.issue20828@psf.upfronthosting.co.za>
2014-03-02 15:10:47zzzeeklinkissue20828 messages
2014-03-02 15:10:47zzzeekcreate