On Mon, May 6, 2019 at 11:14 AM Serhiy Storchaka <storch...@gmail.com> wrote:
> 06.05.19 17:49, Guido van Rossum пише: > > 20-25 years ago this might have been a good idea. Unfortunately there's > > so much code (including well-publicized example code) that I'm not sure > > it's a good use of anyone's time to try and fix this. > > 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. :-( -- --Guido van Rossum (python.org/~guido) *Pronouns: he/him/his **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/