[-] eternacht@programming.dev 14 points 5 days ago

Quick mix some lime juice in there!

17
[-] eternacht@programming.dev 7 points 1 month ago

+1 for Immich, I tried photoprism and had a lot of trouble importing and organizing an existing library. Immich works much more intuitively and had all the features I needed.

[-] eternacht@programming.dev 3 points 11 months ago

YES! I rewatched recently. I thought it would age poorly but it’s still extremely watchable.

[-] eternacht@programming.dev 1 points 1 year ago

This is the real answer, overloads are meant for exactly this purpose.

It’ll be something like this:

from typing import Literal, overload

@overload
def foo() -> Data: …
@overload
def foo(return_more: Literal[True]) -> tuple[Data, Data]: …
def foo(return_more: bool = False) -> Data | tuple[Data, Data]
    ...
    if return_more:
        return data, more_data
   return data

eternacht

joined 1 year ago