On Wed, Dec 9, 2020 at 12:05 PM Mathew Elman <mathew.el...@ocado.com> wrote:

> Steven D'Aprano wrote:
> > On Tue, Dec 08, 2020 at 11:46:59AM -0000, Mathew Elman wrote:
> > > I would like to propose adding lazy types for casting
> > > builtins in a
> > > lazy fashion. e.g. lazy_tuple which creates a reference to the
> > > source iterable and a morally immutable sequence but only populates
> > > the tupular container when it or the source is used.
> > > What are your use-cases for this?
> > Does this include things like lazy_list, lazy_float,
> > lazy_bool,
> > lazy_str, lazy_bytearray etc?
>
> I would say yes, it should include these types as well.
> The use case is for when you are casting between types a high number of
> times to pass them around, especially into another type and back.
>
>
Out of morbid curiosity, why would you need to be casting between iterables
many times? Don't most consumers treat iterables roughly equally?
_______________________________________________
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/PYT3A5XMVJVT3PEAQ6RTFQUQKWQOSEHQ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to