[Python-ideas] Re: lowercase exception names trip-up .

2019-12-06 Thread Guido van Rossum
On Fri, Dec 6, 2019 at 5:42 PM Matthias Bussonnier < bussonniermatth...@gmail.com> wrote: > [...] > My original request on bpo[1] was for `re` which is actively maintained, > but I was advised to ask for a more general policy and thoughts here as > whether renaming of a an exception was acceptable

[Python-ideas] Re: lowercase exception names trip-up .

2019-12-06 Thread Matthias Bussonnier
> I'm torn -- on the one hand, these very old modules may as well stay frozen in time (please double check that they aren't listed in PEP 594) And > I expect that will be quite common — older code commonly uses lower case class names Thank, checking 594 is a good idea; I understand why you are

[Python-ideas] Re: lowercase exception names trip-up .

2019-12-06 Thread Christopher Barker
On Fri, Dec 6, 2019 at 1:02 PM Guido van Rossum wrote > check that there are no *other* classes in a module that also use a > lowercase naming convention (if there are, that module needs more thought > before we change just the exception name). > I expect that will be quite common — older code

[Python-ideas] Re: lowercase exception names trip-up .

2019-12-06 Thread Guido van Rossum
I'm torn -- on the one hand, these very old modules may as well stay frozen in time (please double check that they aren't listed in PEP 594). On the other hand, for modules that are still actively maintained, the exception may as well be named Error instead of error, and a rename of error -> Error

[Python-ideas] Re: lowercase exception names trip-up .

2019-12-06 Thread Soni L.
On 2019-12-06 3:58 p.m., Christopher Barker wrote: I notice that most(all?) of those are from pretty old modules, which explains the "old", pre PEP-8 names. I think it would be good to clean this up with a set of aliases -- but it is a fair bit of code-churn for not much real gain. I guess i

[Python-ideas] Re: lowercase exception names trip-up .

2019-12-06 Thread Christopher Barker
I notice that most(all?) of those are from pretty old modules, which explains the "old", pre PEP-8 names. I think it would be good to clean this up with a set of aliases -- but it is a fair bit of code-churn for not much real gain. I guess it comes down to: - How much maintenance do those modules

[Python-ideas] Re: lowercase exception names trip-up .

2019-12-05 Thread Matthias Bussonnier
Thanks for pointing those out. At least when the alias is `error = OtherName` the text is the stack trace are informative. -- M ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org ht

[Python-ideas] Re: lowercase exception names trip-up .

2019-12-05 Thread Serhiy Storchaka
05.12.19 21:25, Matthias Bussonnier пише: I've been tripped up a couple of time by a few Exception names being lower case both in code and tracebacks. In particular `error` (all lower case) I tend to read `error` as a function instead of a class. According to my non-scientific grep-foo, I find