On Fri, 4 Nov 2022 at 05:03, Paulo da Silva
<p_d_a_s_i_l_v_a...@nonetnoaddress.pt> wrote:
> Changing def foos(self) -> list[int]:  to
>   def foos(self) -> Union[list[int]]:
> fixes the problem.
> Not so elegant, however!

Wait, what?!

Union[X, Y] means "X or Y"
Union[X] means "X, but don't complain if it's a @property".

Is that how it goes?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to