sagemath / sage-patchbot

Sage Patchbot
https://www.sagemath.org
Other
8 stars 17 forks source link

one new proposed plugin for raise statements + some more doc #51

Closed fchapoton closed 10 years ago

fchapoton commented 10 years ago

I propose to check that all new raise statements are using the python 3 syntax.

fchapoton commented 10 years ago

This cleanup has been done in #15990. in my humble opinion, it should be monitored.

robertwb commented 10 years ago

Thanks. Just one comment.

fchapoton commented 10 years ago

Why ? Is it possible to have an underscore in the names of exceptions ? I cannot think of any example, as they seem to systematically use CamelCase.

Oh, I see, maybe you just propose not to separate "Error" ? Something like "^\sraise\s[A-Za-z]\s,"

robertwb commented 10 years ago

Well, what we really want to do is warn on the old syntax

raise expr, expr[, expr]

but expr doesn't make a nice regex. I was suggesting checking for

raise IDENT, expr[, expr]

On Thu, Jul 31, 2014 at 1:15 AM, fchapoton notifications@github.com wrote:

Why ? Is it possible to have an underscore in the names of exceptions ? I cannot think of any example, as they seem to systematically use CamelCase.

Oh, I see, maybe you just propose not to separate "Error" ? Something like "^\sraise\s[A-Za-z]\s,"

— Reply to this email directly or view it on GitHub https://github.com/robertwb/sage-patchbot/pull/51#issuecomment-50729979.