On Fri, Nov 12, 2021 at 11:47 AM Steven D'Aprano <st...@pearwood.info> wrote:
>
> I know this suggestion is withdrawn and the thread all but finished, but
> for completion, I'd like to answer one of Chris' questions:
>
> On Fri, Nov 12, 2021 at 04:48:58AM +1100, Chris Angelico wrote:
>
> > I'll have to get someone else to confirm, but I believe that str, int,
> > etc were functions for a lot of Python's history.
>
> I don't know if the first eleven years counts as "a lot" of Python's
> history (it's about 1/3rd of Python's existence at this point), but in
> Python 1.x and some of 2.x, str, int, float, list etc were all actual
> functions and couldn't be subclassed:
>
> It wasn't until Python 2.2 that builtin types and classes were unified,
> becoming the same thing; the functions str, int, etc became classes; and
> every object in Python was consolidated into a single heirarchy with
> `object` as the root.
>
> https://www.python.org/download/releases/2.2.3/descrintro/
>

Thanks, that's what I was thinking of. Most notably, we have several
independent occasions when a builtin function was replaced with a
class that could be used in all the same ways: Python 2.2 for str/int
etc, Python 3.0 for range/map/zip, and I can't recall others right
now, but there probably have been.

BTW, when I said "someone else" there, I was thinking of you and your
history lessons, so, thank you :)

ChrisA
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/XBHKWBWTZT2OQXFQVLX7YUN67JP466FZ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to