[Python-ideas] Consistency in naming [was Re: ...ALL CAPS]
Steven D'Aprano
steve at pearwood.info
Fri Feb 1 17:34:09 EST 2019
On Fri, Feb 01, 2019 at 11:07:04PM +0100, Anders Hovmöller wrote:
>
> > The only exception to that is that I wish that ``object`` would be
> > renamed to Object. That would distinguish between Object, the base class
> > of all types, and object, an instance of some class. In my personal
> > opinion, being more clear about that distinction would be worth the pain
> > in ways that (say) renaming datetime to DateTime would not be.
>
> Could you detail what that pain would be?
That was described in the part of my email that you deleted. Quoting
Eric:
Because the hassle involved in making the change, supporting both for a
long time, invalidating tons of working code, invalidating tutorials,
migrating existing pickle files, etc. isn't worth any slight gain in
consistency.
> To me it seems like you'd
> have both names for a while with deprecation warnings. Doesn't sound
> too painful. Especially in the datetime case which is already quite
> painful.
What's painful about it?
- the status quo means "no change", so there is no hassle there;
- we don't have to support two names;
- or manage depreciation warnings;
- no working code is invalidated by "not changing" the class;
- no tutorials or books are invalidated;
- existing pickle files continue to work;
- there are no questions on forums asking "what's the difference
between datetime and DateTime, which should I use?"
--
Steven
More information about the Python-ideas
mailing list