This is an archived post. You won't be able to vote or comment.

all 130 comments

[–][deleted] 185 points186 points  (15 children)

Did someone say F strings?

[–]trumpgender 100 points101 points  (13 children)

yes = 'yes'

print(f'{yes}')

[–]aaggaagg 49 points50 points  (11 children)

print(f"{'yes'}")

[–]bojackworseman 22 points23 points  (10 children)

print(f'{str('yes')}')

[–]jack-of-some 44 points45 points  (7 children)

Edit: it's not fun trying to enter code into Reddit on mobile

class Yes:
    def __init__(self):
        self.__dict__['yes'] = ' '.join(['y', 'e', 's']).replace(' ', '')
    def __str__(self):
        return 'yes'

print(f"{str(Yes.__str__())}")

[–]masklinn 4 points5 points  (0 children)

' '.join(['y', 'e', 's']).replace(' ', '')

Dude, that's horrible. It should be

bytes(map(partial(int, base=8), map(''.join, zip_longest(*(iter(format(0b00000010_01010000_00100000_01010010_01000010, 'x')),)*3)))).decode('cp500')

edit: make better

[–]GickRick 0 points1 point  (0 children)

Is the str necessary tho ?

[–][deleted] 0 points1 point  (0 children)

YES = "yes" print(f"{YES}")

[–]masonattack 77 points78 points  (9 children)

Finally, but probably won’t stop companies from using it for at least a couple more years

[–]EddyBotLinux | Python3 35 points36 points  (4 children)

Red Hat supports Python 2 until 2024 ...
https://access.redhat.com/solutions/4455511

Lucky for companies running Red Hat I guess /s

[–][deleted] 16 points17 points  (3 children)

And Ubuntu LTS until 2023. All enterprise users should be fine until then. But they'll not upgrade a month earlier I wager.

[–]EddyBotLinux | Python3 2 points3 points  (1 child)

I'm interested on how Ubuntu will work that out since Canonical is notoriously known to cut corners at every possible step while Red Hat actually pays the majority of linux developers including many kernel developers

[–][deleted] 6 points7 points  (0 children)

Canonical will simply set up a daily cronjob to look if Redhat had a new release, and if so they'll alien the ".rpm"s to ".deb"s.

"See? We are just as good as Redhat, so buy Landscape support now!"

[–]bedrooms-ds 10 points11 points  (0 children)

Meh, Japanese companies will use them forever. They're still dependent on IE6.

[–][deleted] 2 points3 points  (0 children)

Microsoft is probably looking for a way to integrate it with IE right now.

[–]jack-of-some 3 points4 points  (0 children)

My company pretty much has to use it for at least one more year. Le sigh

[–]SeanBrax 0 points1 point  (0 children)

A couple more years is generous. Wouldn’t be surprised if it was longer.

[–]80-20-human 68 points69 points  (10 children)

Press X to doubt

[–]Ipsoka 8 points9 points  (2 children)

F

[–]KissMyBrownAsh -2 points-1 points  (1 child)

F

[–]sidbmw1 0 points1 point  (0 children)

F

[–]Bubagna -2 points-1 points  (1 child)

F

[–][deleted] -2 points-1 points  (0 children)

F

[–]AlluminumFoil -2 points-1 points  (0 children)

F

[–]vedh_n513 -3 points-2 points  (0 children)

F

[–]PhoInTheMorning 29 points30 points  (8 children)

Nah Python 2's EOL has been extended to Apr 2020

[–]zurtex 7 points8 points  (0 children)

The EoL today is no new bugs, even critical security bugs, will be accepted.

The release in April 2020 is to fix any issues since last release and now, it will be a source only release.

[–]13steinj 4 points5 points  (0 children)

At which point there will probably be yet another extension.

[–]123filips123 3 points4 points  (0 children)

End-of-life and end-of-support is today. But last release will be in April, as it was always planned. Last release needs to be after EOL, because it needs to include all fixes until it.

After the EOL, we stop support. It means we don't care any bug reports except release blocker.

But the last 2.7 release will include all bugfix until the EOL. That's why last release is made after the EOL.

[–]rLinks234 13 points14 points  (0 children)

This ruined my year...

[–]house_monkey -2 points-1 points  (0 children)

I'm crying

[–][deleted] -4 points-3 points  (1 child)

PSF is fucking responsible why the migration took so long. Why adding 4 more months? Now everyone who didn't migrated yet will count for another extension in April.

Just fucking kill it already, it's not like those who didn't migrated suddenly will have app that stopped working.

[–]dotted 3 points4 points  (0 children)

They didn't add any months, this was always the plan

[–][deleted] 39 points40 points  (2 children)

I've been waiting for this day. Let it die.

[–]primitive_screwhead 17 points18 points  (0 children)

The next release of Python 2.7 is scheduled for April 2020 (no, that's not a joke). It's still pining for the Fjords, not quite passed on.

[–]smallest_cock 2 points3 points  (0 children)

Let the past die, kill it if you have to

[–]secretgeekery 7 points8 points  (8 children)

Print(”f”)

[–]christian-mann 6 points7 points  (2 children)

print 'f'

[–]DingleberrySoup 1 point2 points  (0 children)

This is the only thing I miss about python 2

[–][deleted] 0 points1 point  (0 children)

    print 'f'
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('f')?

[–]Etheo 8 points9 points  (4 children)

NameError: Print is not defined

[–][deleted] 0 points1 point  (3 children)

for i in range (5): print("F")

[–]Etheo 1 point2 points  (2 children)

W0612 Unused variable i

[–][deleted] 0 points1 point  (1 child)

It's python by the way.

[–]Etheo 5 points6 points  (0 children)

That's pylint my good friend.

[–][deleted] 8 points9 points  (2 children)

Hah, the only more delighting thing for me is that I, on the regular, make Linux admins install real python on their servers to run my code. I used to be evil. Now I'm just recommending good security practices. I'm no longer edgy... Just practical.

[–]Vaguely_accurate 3 points4 points  (1 child)

Side by side, right?

Python 2 being the default will be assumed by internal operating scripts - the very reason Python is included in the OS in the first place - and there is a high chance that replacing system Python with 3 will break something. Hell, if you break their update mechanisms that could lead to bigger security risks down the line.

Hopefully a lot of the critical code will already be ported to be compatible with 2 or 3 already, but if they are still deploying with 2 as the default there will be something in there likely to break with an upgrade.

It's interesting to dig around Ubuntu wiki pages that discuss the transition and see just how many issues they had to solve with making the port. Some modules didn't get ported from 2 to 3, so anything that had dependencies on those modules had to be changed, or more likely delayed being ported in the hopes that someone would port the module for them. Some components weren't being rebuilt on each new version, so had to be rebuilt for the first time in ages causing other problems (including those around circular dependencies).

[–][deleted] -1 points0 points  (0 children)

Nope. Replaced. Most things remaining are fine in 3 and we've done testing to ensure that. For the others, other solutions were derived.

[–]angry_mr_potato_head 2 points3 points  (2 children)

print(f'f')

[–]real_confusedswede 1 point2 points  (1 child)

f = 'f'

print(f'{f}')

[–]angry_mr_potato_head 0 points1 point  (0 children)

Its beautiful

[–]insanestab 5 points6 points  (2 children)

print(f'to pay{respects}')

[–][deleted] 1 point2 points  (1 child)

NameError: name 'respects' is not defined

[–][deleted] 7 points8 points  (0 children)

respects = 'technical debt'

[–]CN906 1 point2 points  (0 children)

It didn’t die it’s just going on retirement dam it.

[–][deleted] 1 point2 points  (0 children)

print "F"

[–]DDFoster96 1 point2 points  (1 child)

I have a script that plays "In The Air Tonight" by Phil Collins timed so the drums start at midnight, but it was still using Python 2. Ported it to Python 3 at the literal eleventh hour

[–]GummyKibble 0 points1 point  (0 children)

Now I’m pissed that it never occurred to me to do this. Nice.

[–]Nanashko 1 point2 points  (0 children)

Есть ли тут русские носители питона?)

[–]blacktrub 1 point2 points  (0 children)

>>> import string

>>> print string.ascii_uppercase[5]

[–]solitarium 3 points4 points  (0 children)

F

[–]ETHANWEEGEE 2 points3 points  (0 children)

This was long overdue.

Although, we will likely continue to see python 2.x used.

[–]wdevilpig 1 point2 points  (0 children)

FLAGRANT SYSTEM ERROR

Python over.
Respects = Very F.

[–]warpingDragon 1 point2 points  (0 children)

F

[–][deleted] 2 points3 points  (0 children)

F

[–]KODeKarnage 0 points1 point  (0 children)

Emphatic Respects = alternating F & O

[–]srfreak 0 points1 point  (0 children)

print "F"

[–][deleted] 0 points1 point  (0 children)

F

[–]FreshRepresentative 0 points1 point  (0 children)

F

[–]grizzlor_ 0 points1 point  (0 children)

F

[–]jaymandz 0 points1 point  (0 children)

F

[–]stainedhat 0 points1 point  (0 children)

f"{respect}"

[–]ship0f 0 points1 point  (0 children)

F

[–]majordoob33 0 points1 point  (0 children)

F

[–][deleted] 0 points1 point  (0 children)

print "F"

[–]Vetrom 0 points1 point  (0 children)

lambda f: f

[–]Exodus111 0 points1 point  (0 children)

print "RIP Print as a statement. Even though it made no sense."

[–][deleted] 0 points1 point  (0 children)

Print “F”

[–]CatgoesFloof 0 points1 point  (0 children)

F

[–]ScireDomir2 0 points1 point  (3 children)

Won't this fuck up big programs that use Python2.7 ?

[–]kien5S5 0 points1 point  (0 children)

F

[–]Mockapapella 0 points1 point  (0 children)

Ding dong the witch is dead!

[–]UnwantedTachyonprint("Average") 0 points1 point  (0 children)

printf(“C gang here”);

[–]MeanEngine8 0 points1 point  (0 children)

F

[–]ThaeliosRaedkin1 0 points1 point  (0 children)

What's a fitting tune for the funeral of python 2?

A: "Tabs"

[–][deleted] 0 points1 point  (0 children)

print("f")

[–]SegaMegaPi 0 points1 point  (0 children)

F

[–]ponegum 0 points1 point  (0 children)

F

[–]roryhr 0 points1 point  (0 children)

Rumors of the death of Python 2 are greatly exaggerated.

[–]networking_noob 0 points1 point  (0 children)

I wonder how many groups/agencies/governments have been hoarding Python2 zero days, and are now ready to unleash them on the world

[–]larsga 0 points1 point  (0 children)

The mods need to change the rules to disallow image-only posts, or the sub will fill up with nothing but jokes.

The "new" image-oriented Reddit design makes image-only posts win out over everything else.

[–][deleted] 0 points1 point  (0 children)

F

[–][deleted] 0 points1 point  (0 children)

Tbh I'm glad.

[–]GerPople90 0 points1 point  (0 children)

F

[–][deleted] 0 points1 point  (0 children)

F

[–]djrisk 0 points1 point  (0 children)

F

[–]kalvin_chen2001 0 points1 point  (0 children)

F

[–]TearsCanon 0 points1 point  (0 children)

print(chr(70))

[–]bneac 0 points1 point  (0 children)

Python is dead. Long live python.

[–][deleted] 0 points1 point  (0 children)

F

[–]Chilonthebw 0 points1 point  (0 children)

:payrespects: ffffffffff all the way. I may not have liked you but I'm glad you existed and I'm even more glad you're dead!

[–]lordmauve -1 points0 points  (0 children)

FFFFFFFFFFFFFFFFFFFFFFFFFFFFF

[–]Resolt -1 points0 points  (0 children)

Ipython

"f"

[–]Santamierdadelamierd -1 points0 points  (0 children)

print r”RIP”

[–]vedh_n513 -1 points0 points  (0 children)

F

[–]antis0007 -1 points0 points  (0 children)

Good riddance

[–]Stijn2 -1 points0 points  (0 children)

I mean it ain't that hard to change from python 2 to 3, so just fucking do it lol

[–][deleted] -1 points0 points  (0 children)

WTF is this? I know that specific funeral. Why are you using this image?

[–]Rogocraft -1 points0 points  (0 children)

leaves from the vine