On 2022-06-23 00:03:03, Paul Bryan wrote:
> What type hint will be exposed for the __init__ parameter? Clearly,
> it's not a `str` type in your example; you're passing it an `int` value
> in your example. Presumably to overcome this, you'd need yet another
> `field` function parameter to provide the type hint for the `__init__`
> param?

Can't this be derived from the type `default_factory` function?

`chr` is something like:

> def chr(num: int) -> str:

So that type should be `int`.
_______________________________________________
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/S4YKLANPZAXC2HCMX5Z2ZPROPPIZK244/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to