Re: A proposal to modify `None` so that it hashes to a constant
Guido van Rossum <[email protected]> Mon, 28 Nov 2022 17:15:31 -0800
| Newsgroups | gmane.comp.python.devel |
|---|---|
| Message-ID | <CAP7+vJJuD98Hpv9D=puMe2zzW-Jtx1_srYPakQmwLU_SaN7Rgw@mail.gmail.com> |
Nah, `__prepare__` very much predates stable dicts and that problem was solved differently. On Mon, Nov 28, 2022 at 4:46 PM Greg Ewing <[email protected]> wrote: > On 29/11/22 12:51 pm, Guido van Rossum wrote: > > "Sets weren't meant to be deterministic" sounds like a remnant of > > the old philosophy, where we said the same about dicts -- until they > > became deterministic without slowing down, and then everybody loved it. > > I got the impression that there were some internal language reasons > to want stable dicts, e.g. so that the class dict passed to __prepare__ > preserves the order in which names are assigned in the class body. Are > there any such use cases for stable sets? > > -- > Greg > _______________________________________________ > Python-Dev mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/3TEOQMV2UXOKWMHVYA63JLPLAZ2TNX55/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido van Rossum (python.org/~guido) *Pronouns: he/him **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>