[issue38981] better name for re.error Exception class.

2020-09-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- type: security -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38981] better name for re.error Exception class.

2020-09-16 Thread Sourabh
Change by Sourabh : -- nosy: +sourabh025 type: enhancement -> security ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue38981] better name for re.error Exception class.

2019-12-09 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: > RECompileError, REParseError, RESyntaxError, REError, CompileError, > ParseError, SyntaxError or Error, > Many modules [...] have an exception named just Error RECompileError, REParseError, RESyntaxError, REError, CompileError, ParseError are all fi

[issue38981] better name for re.error Exception class.

2019-12-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not sure about the new name. "re" is an abbreviation, so if include it in the exception name it should be "RE". I am not sure what name is better: RECompileError, REParseError, RESyntaxError, REError, CompileError, ParseError, SyntaxError or Error. j

[issue38981] better name for re.error Exception class.

2019-12-07 Thread Matthias Bussonnier
Change by Matthias Bussonnier : -- keywords: +patch pull_requests: +16979 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17501 ___ Python tracker _

[issue38981] better name for re.error Exception class.

2019-12-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: Strictly speaking not all of those _need_ to be touched given the old name is always going to exist for backwards compatibility. But I agree that we should update them as part of this regardless. I'd go forward with a PR. The only fallout I expect a chan

[issue38981] better name for re.error Exception class.

2019-12-07 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Thanks Serhiy, Here is a rough idea of how many places would be touched by renaming in the `re` module: https://github.com/Carreau/cpython/commit/59e4c5150c842f849ff3a9ba8a94df1df7a5eb1c (50 additions and 42 deletions.). I haven't found any places t

[issue38981] better name for re.error Exception class.

2019-12-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue38981] better name for re.error Exception class.

2019-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Reopened after discussing on Python-ideas: https://mail.python.org/archives/list/python-id...@python.org/thread/64NHNY6RD4HQWBSBV6J7XIN7UAHNTQBR/. -- resolution: not a bug -> stage: resolved -> needs patch status: closed -> open type: -> enhanceme

[issue38981] better name for re.error Exception class.

2019-12-05 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Thanks for the advice I've done that ! Have a good day. -- ___ Python tracker ___ ___ Pyth

[issue38981] better name for re.error Exception class.

2019-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since it affects more than one module I suggest to discuss the idea about renaming exceptions of the Python-Ideas maillist first. Until different decision be made I am closing. Personally I think this is a duplicate of just discussed and rejected idea. --

[issue38981] better name for re.error Exception class.

2019-12-05 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Most of the module specific classes are `Error`, not `error`, at least with an uppercase E you know it's a class. if a novice sees : > error: missing ), unterminated subpattern at position 0 It will be relatively tough or them to figure out that `erro

[issue38981] better name for re.error Exception class.

2019-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also the discussion about renaming json.loads(): https://mail.python.org/archives/list/python-id...@python.org/thread/EJTIVQ2ZFSVHALTLRGFCOMOYGZYMKGQU/ -- ___ Python tracker

[issue38981] better name for re.error Exception class.

2019-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is common practice that the module specific exception is called just "error". There is nothing wrong with this. I do not see a need to introduce a different alias. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status:

[issue38981] better name for re.error Exception class.

2019-12-05 Thread Matthias Bussonnier
New submission from Matthias Bussonnier : better error/exception name for re.compile error. Currently the error raise by re.compile when it fails to compile is `error` defined in sre_constants.py: ``` class error(Exception): """Exception raised for invalid regular expressions. ``` Thi