Steve Jorgensen wrote:
> Simão Afonso wrote:
> > On 2022-06-23 17:35:59, Steve Jorgensen wrote:
> > What if, instead, the `init` parameter could accept either a boolean
> > (as it does now) or a type? When given a type, that would mean that to
> > created the property and accept the argument but pass the argument ti
> > `__post_init__` rather than using it to initialize the property
> > directly. The type passed to `init` would become the type hint for the
> > argument.
> > What if you wanted to create a boolean type from a function?
> > Then you would pass `type=bool`
Oops. That was another typo. You would pass `init=bool`.
_______________________________________________
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/YAAMMAP4YWLJ5YWZG6DLFLVTBX73MFGR/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to