Zack Weinberg on Nostr: May as well throw this query out to the fediverse. I am looking for *concrete ...
May as well throw this query out to the fediverse.
I am looking for *concrete examples* of code that works correctly when interpreted by Python 2.7 but *silently produces incorrect output* when interpreted by Python 3.x. I encountered such a thing about 10 years ago but didn't save it and have been unable to reconstruct it.
All examples are good, but examples that produce output from which it's difficult or impossible to recover the correct output are better.
#python #pycon
Published at
2025-05-18 17:07:30 UTCEvent JSON
{
"id": "a5cde052685147af2bd464e6fb05d90e06cb9778e41623bfa921c2399d158674",
"pubkey": "7f29f68e80629539ff14d050aa77ffff5a9710c6090d97728cc16618efd61524",
"created_at": 1747588050,
"kind": 1,
"tags": [
[
"proxy",
"https://masto.hackers.town/@zwol/114529930473321177",
"web"
],
[
"t",
"pycon"
],
[
"t",
"python"
],
[
"proxy",
"https://masto.hackers.town/users/zwol/statuses/114529930473321177",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://masto.hackers.town/users/zwol/statuses/114529930473321177",
"pink.momostr"
],
[
"-"
]
],
"content": "May as well throw this query out to the fediverse.\n\nI am looking for *concrete examples* of code that works correctly when interpreted by Python 2.7 but *silently produces incorrect output* when interpreted by Python 3.x. I encountered such a thing about 10 years ago but didn't save it and have been unable to reconstruct it.\n\nAll examples are good, but examples that produce output from which it's difficult or impossible to recover the correct output are better.\n\n#python #pycon",
"sig": "da3764885a62066def4a75950363d78455099129a4b6a4adbc5f03027b544a3882a2624257b674c19e50c1ad8de2ec55e5a30e3a5cd027c17e70dcbdbf4bfcc4"
}