Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(10)  |  Derive(0)  |  Import(0)
Warn the user that a given chunk of code is not valid Python 3,
but that it cannot be converted automatically.

First argument is the top-level node for the code in question.
Optional second argument is why it can't be converted.

src/p/y/py3kwarn-0.4.4/py3kwarn2to3/fixes/fix_urllib.py   py3kwarn(Download)
                mod_member.replace(Name(new_name, prefix=pref))
            else:
                self.cannot_convert(node, "This is an invalid module element")
 
        # Multiple members being imported
                node.replace(nodes)
            else:
                self.cannot_convert(node, "All module elements are invalid")
 
    def transform_dot(self, node, results):
                                    prefix=module_dot.prefix))
        else:
            self.cannot_convert(node, "This is an invalid module element")
 
    def transform(self, node, results):
        # Renaming and star imports are not supported for these modules.
        elif results.get("module_star"):
            self.cannot_convert(node, "Cannot handle star imports.")
        elif results.get("module_as"):
            self.cannot_convert(node, "This module is now multiple modules")

src/p/y/py3kwarn-HEAD/py3kwarn2to3/fixes/fix_urllib.py   py3kwarn(Download)
                mod_member.replace(Name(new_name, prefix=pref))
            else:
                self.cannot_convert(node, "This is an invalid module element")
 
        # Multiple members being imported
                node.replace(nodes)
            else:
                self.cannot_convert(node, "All module elements are invalid")
 
    def transform_dot(self, node, results):
                                    prefix=module_dot.prefix))
        else:
            self.cannot_convert(node, "This is an invalid module element")
 
    def transform(self, node, results):
        # Renaming and star imports are not supported for these modules.
        elif results.get("module_star"):
            self.cannot_convert(node, "Cannot handle star imports.")
        elif results.get("module_as"):
            self.cannot_convert(node, "This module is now multiple modules")