https://peps.python.org/pep-0544/#explicitly-declaring-imple...
1,425 karma · joined December 4, 2020
https://peps.python.org/pep-0544/#explicitly-declaring-imple...
typing.Protocol is a good fit for this use case
from typing import Protocol
class HasMessage(Protocol):
def get_message(self) -> str: ...
class A:
"""Implicit (duck-typed)"""
def get_message(self) -> str:
return "A"
class B(HasMessage):
"""Explicit"""
def get_message(self) -> str:
return "B"
class C:
def get_message(self) -> int:
return 1
def print_message(m: HasMessage) -> None:
print(m.get_message())
print_message(A())
print_message(B())
print_message(C()) # fails type checkIt can be simultaneously true that immigrants to the U.S. from both advanced and developing nations both experience a higher standard of living than their countries of origin.
Immigrating to the U.S. with an advanced degree in an in-demand field: you likely will experience a higher standard of living.
Immigrating to the U.S. from a developing country without a particularly in-demand career: you likely will experience a higher standard of living.
I would add these points to negative long-term personal effects:
- potential for cognitive impairment / deficit from long-term AI use.
- lack of diversity / creativity / heterogeneity / outside the box thinking of any sort in work going forward.
The CO2 that you exhale came from elements that were fairly recently part of an animal or vegetable - ie part of an active and ongoing carbon cycle, rather than deposited into the ground 100M years ago and pulled out to be inserted into the system.
Carbon cycles aren't bad - they're fundamental to life on Earth, obviously. It's making the system unstable by continuous addition that causes the problem.
There was one in 2020, granted it was the shortest on record.
There is at least a chance for it to be redistributed, unlike private wealth.
61 + 51 in your example.
It's pretty clear that governments engage in such two-sided talk at their peril going forward. This is exactly how you get populism - usually of the far-right variety, with its specific blend of parochialism, jingoism and nihilism.
> You're part of a team, you're contributing, you're also (measurably) pulling less hard than you would if the rope were yours alone
There’s a perfectly rational reason for this. Success is collective, but failure is individual.
Rewards for the success accrue to the person who represents it to the right people (usually those with the shortest path to the organization root).
For all intents and purposes, the person who gives the presentation did the work.
A nuclear armed Iran could hold oil and gas shipments in the Straight of Hormuz hostage indefinitely. It could also threaten U.S. bases and warships in the area. It could threaten regional allies with a nuclear attack.
> Are we really back in "trust me they have WMDs" territory?
Irrespective of everything else going on, it’s well established that Iran has a nuclear program in the advanced stages of development. There was a whole UN program around inspecting it.
> That would make the US turn tail. Not start a war with China.
The right kind of missiles hitting the right kind of boat could lead to a very grave escalation.
Indeed. “Used to” is the key observation. In the wake of WW2, the U.S. had both dynamism and the ability and will to act collectively. This combination led to rising standards of living, the space program, Silicon Valley, the internet, etc.
The U.S. economy is still relatively dynamic, but the will to collective action has completely failed.
Europe can act collectively but lacks dynamism.
Which country, today, demonstrates both traits?
If history is any guide, that doesn't happen without a substantial - existential, perhaps - exogenous shock.
One of the things I remember most from my career was a manager "rules lawyering" about bereavement leave when my aunt passed away. Ironically, HR was very sympathetic and accommodating, and it was a non-issue with them.
I've been treated "worse" by jackass execs and managers, but always in the context of work. Someone acting in the way this manager did about a personal situation sticks with me much more than those.
It’s very dangerous to do the “right thing” for the wrong reasons in a complex situation. This is step 1. Does anyone have faith that the Trump admin will properly execute steps 2..N?
I would have some respect if the administration announced that it would support a provisional government led by the apparent winner of the last election in Venezuela. As such it seems to be that the administration has left the existing power structure in place and established a client/patron relationship with the leadership. This is revolting.