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 LambertDW
Recipients LambertDW, aronacher, bhy, collinwinter
Date 2008-12-08.16:19:20
SpamBayes Score 3.3032577e-06
Marked as misclassified No
Message-id <1228753162.14.0.965599525422.issue2899@psf.upfronthosting.co.za>
In-reply-to
Content
I expect the answer will be that 2to3 cannot know what sort of object
"string" names.  Bell's theorem, or some such, as I understand it, tells
us that you must execute the algorithm to find out what it does, there
isn't a short cut.

It does seem like 2to3 could assume that you write code with honorable
intention, grace, and style and thereby offer a suggestive note.  The
string module is not an isolated case for such notices.  I made a
similar request to yours for "file" which is gone in version 3.

Unfortunately, code as follows is probably frequent, so we aren't likely
to get support for this feature.  Maybe here is an opportunity for
venture capital!

def f(list):
    '''
        argument should be a list.
        "list" in this scope no longer names __builtins__.list
    '''
History
Date User Action Args
2008-12-08 16:19:22LambertDWsetrecipients: + LambertDW, collinwinter, aronacher, bhy
2008-12-08 16:19:22LambertDWsetmessageid: <1228753162.14.0.965599525422.issue2899@psf.upfronthosting.co.za>
2008-12-08 16:19:21LambertDWlinkissue2899 messages
2008-12-08 16:19:20LambertDWcreate