David W. Lambert <[EMAIL PROTECTED]> added the comment: 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 ''' ---------- nosy: +LambertDW _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2899> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com