Matthew Martin β β
π on Nostr: #python every python release has more type annotations that aren't backwards ...
#python every python release has more type annotations that aren't backwards compatible, but if you stripped off the annotations, it would become backwards compatible with no runtime change! But if I strip off the annotations, any developer using it as a library suffers.
Options
- tool to strip off annotations, ship nude package
- ship it twice
- use .pyi all the time (ugh!)
- python switch/config option to ignore annotations & typing imports
Published at
2023-08-03 11:52:40Event JSON
{
"id": "88d9ba0f7b891dcf62a45d39dfc404076446720b0e9d0d0c10dd18d9dd37d010",
"pubkey": "ece51acfc6c84a5f625a755bed921f6eac6a9daa6f90817047901dbe0231522f",
"created_at": 1691063560,
"kind": 1,
"tags": [
[
"t",
"python"
],
[
"mostr",
"https://mastodon.social/users/mistersql/statuses/110825541485927461"
]
],
"content": "#python every python release has more type annotations that aren't backwards compatible, but if you stripped off the annotations, it would become backwards compatible with no runtime change! But if I strip off the annotations, any developer using it as a library suffers. \n\nOptions\n- tool to strip off annotations, ship nude package\n- ship it twice\n- use .pyi all the time (ugh!)\n- python switch/config option to ignore annotations \u0026 typing imports",
"sig": "f5bccb0250c958de763c81e7f5f69fb1467f964c9e46290c3d55542e5f22cfeb45da40e2a52ac09e4255672804ed9ee2bffbcf015f83440d346e527ee2d4b01c"
}