On Mon, 6 May 2019 19:39:39 +0300
Serge Matveenko <s...@matveenko.ru> wrote:
> On Mon, May 6, 2019 at 7:29 PM Guido van Rossum <gu...@python.org> wrote:
> >
> > On Mon, May 6, 2019 at 11:14 AM Serhiy Storchaka <storch...@gmail.com> 
> > wrote:  
> >> I do not propose to change the current behavior. I propose to add new
> >> named constructors. In most cases default constructors can be used, but
> >> in cases when we use type check or different tricks to limit the type of
> >> the argument, we could use named constructors.
> >>
> >> Current named constructors:
> >>
> >> * dict.fromkeys()
> >> * int.from_bytes()
> >> * float.fromhex()
> >> * bytes.fromhex()
> >> * bytearray.fromhex()  
> >
> >
> > Understood. My point is that we won't be able to remove the original 
> > behavior, so we'd end up with two ways to do it. :-(  
> 
> With all respect, I disagree. There are ways to evolve Python such as
> deprecation policies which proven to be effective. There are ways to
> monitor current features adoption on PyPI to see whether it is safe to
> remove deprecated things.

The main constructors for built-in types are used so pervasively that
there is no hope of actually removing such deprecated behavior.

Regards

Antoine.


_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to