[-] nikaro@jlai.lu 4 points 4 months ago

Disclosure: i work at Infomaniak.

I don't think Google was saying "come get your ethical email", more like "get your free email". Infomaniak is making money by selling services. The free tier is just there as a loss leader. Google was already selling ads. So i don't think it compares.

BTW, Infomaniak is already 30 years old :-)

[-] nikaro@jlai.lu 6 points 1 year ago

And no smartphone in your pocket, of course.

[-] nikaro@jlai.lu 18 points 1 year ago

You can use KeePassXC (with a dedicated vault or not), synced by another mean (Nextcloud, Syncthing, Git, etc.).

[-] nikaro@jlai.lu 9 points 1 year ago* (last edited 1 year ago)

Certainly not the best, but codecademy is decent. After that, it should be enough for you to learn more deeply from official Python documentation, actual Python code base (from OSS repositories), and specific subjects from blog articles.

But it will highly depend on what type of content you like. For example some people may prefer books over interactive courses. If this is your case, i think this one is recognized as a very good one: https://learnpythonthehardway.org/python3/

[-] nikaro@jlai.lu 3 points 1 year ago

Can you explain it to me like i'm a 10 yrs old (which i'm not 🙄), then?

[-] nikaro@jlai.lu 4 points 2 years ago

Nice! It looks like the best solution out there.

[-] nikaro@jlai.lu 4 points 2 years ago* (last edited 2 years ago)

Python >= 3.10 version:

def foo(return_more: bool) -> DataType | tuple[DataType, MoreDataType]: ...

But i would definitely avoid to do that if possible. I would maybe do something like this instead:

def foo(return_more: bool) -> tuple[DataType, MoreDataType | None]:
    ...
    if return_more:
        return data, more_data
   return data, None

Or if data is a dict, just update it with more_data:

def foo(return_more: bool) -> dict[str, Any]:
    ...
    if return_more:
        return data.update(more_data)
   return data
[-] nikaro@jlai.lu 1 points 2 years ago

The difference is that with Protocol you can define which method presence you want to ensure. Like i said: custom vs. generic.

[-] nikaro@jlai.lu 1 points 2 years ago

From what i understand, Protocol is for custom interfaces that you define (this object must have do_x() method), while ABCs are generic (this object is iterable).

35
submitted 2 years ago* (last edited 2 years ago) by nikaro@jlai.lu to c/python@programming.dev

This is like Interface in Go (or Java, i don't speak Java but the article say so).

[-] nikaro@jlai.lu 6 points 2 years ago

You won't see the end of these crapwares until there is centralized managment console with it, sadly...

nikaro

joined 2 years ago