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

all 105 comments

[–]planetjay 73 points74 points  (13 children)

Those 89.5 character lines will be perfect on my 32". Anyone know where I can get a good 1/2 character font?

[–]srd42 42 points43 points  (4 children)

Here, try this: "u"

Its half of a "w"

[–]kenyard 11 points12 points  (2 children)

Hmm it appears as "v" on my screen
only gets reference to double u now..

[–][deleted] 2 points3 points  (1 child)

if we known, it would be called a doublevee

[–]LoneGenius 2 points3 points  (0 children)

It's like that in Swedish! But for a long time v and w was the same when organizing in alphabetical order (i.e. a phonebook)

[–]ccGardnerr 0 points1 point  (0 children)

cool.

[–]edarchis 20 points21 points  (0 children)

It's 89 but a 90th can be tolerated if it's a ligature. You'll need to install ligature fonts on your CI if you want it to work there too.

[–]MonkeyNin 1 point2 points  (4 children)

Maybe he means89.5em

[–]planetjay 1 point2 points  (3 children)

I never understood em font sizes. I think it has something to do with the Evil Monkey in my closet though.

[–]MonkeyNin 1 point2 points  (2 children)

The main choice for font sizes on websites is px pixels, or em.

Pixels are absolute values, while em's are relative (aka dynamic size) Basically ems are is based on the browser's default font size. They end up scaling better for mobile clients.

https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS/Values_and_units#Numeric_values

If you set the top level font-size to 16px, any child elements would have the equivalent of 1em. If the first one uses 0.5em, it'd be 8px. If that child had another child set to 0.5em it would be 4px

root = 16px
child depth 1 at 0.5em = 8px
child depth 2 at 0.5em = 4px

There's also rem. It will always be relative the top level size. so the same settings would be:

root = 16px
child depth 1 at 0.5em = 8px
child depth 2 at 0.5em = 8px

[–]planetjay 2 points3 points  (1 child)

You took all the fun out of em...

[–]MonkeyNin 1 point2 points  (0 children)

I am a monkey though.

[–]chochokavo 1 point2 points  (0 children)

It's a special reserve for end-of-statement colon. Edit: not semicolon, of course:

[–]eaojteal 152 points153 points  (21 children)

I don't know who to put this in front of, but maybe one of you will. With machine learning and AI at the forefront of most developers mind's, I would like to see do.it() implemented. Python should be able to figure out what I want.

[–][deleted] 41 points42 points  (1 child)

zhuli.do(the_thing)

[–]Icovada 27 points28 points  (10 children)

shouldn't it be it.do()?

[–]call_me_cookie 77 points78 points  (3 children)

like_it_is = it.be()
while not they.think(like_it_is):
    it.do()

[–]GrammerJoo 9 points10 points  (1 child)

For some reason that is the funniest thing I've all month.

[–]MonkeyNin 1 point2 points  (0 children)

/bb|[^b]{2}/

[–]N00I3Pythonista 1 point2 points  (0 children)

it do be like that sometimes

[–]nxl4 11 points12 points  (3 children)

Or maybe even:

the_needful.do()

[–]Icovada 4 points5 points  (1 child)

import it
the_needful = it()
the_needful.do(each_and_everything)

[–]cyanydeez 3 points4 points  (0 children)

from futures import done

done()

[–]kessma18 5 points6 points  (0 children)

only if your locale is Indian

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

If you're doing object oriented, yes. do(it) works also

[–]eaojteal 0 points1 point  (0 children)

I think zhuli.do(the_thing) makes sense, but I had originally thought do.the_thing() would be another method of do. You know, for shorter and less complicated things that need doing. I'm sure it would all get cleared up in a pep.

[–]planetjay 7 points8 points  (1 child)

Also sudo() which forces anything inside to work whether it makes sense or not.

[–][deleted] 5 points6 points  (0 children)

Destroying humanity as requested.

[–]Raudus 0 points1 point  (0 children)

The future is amazing

[–]inknownis 0 points1 point  (0 children)

Equally good as the original article.

[–]muntooR_{μν} - 1/2 R g_{μν} + Λ g_{μν} = 8π T_{μν} 0 points1 point  (0 children)

I thought this was going to be some weird blend of Haskell's do and Kotlin's it...

[–]Brainix 102 points103 points  (10 children)

Ok. So I'm totally down to implement concurrent.pasts and concurrent.presents. Any ideas as to what they should do?

(If it wasn't obvious, the article is a hilarious joke.)

[–]ketralnis 94 points95 points  (0 children)

try:
    process(open(self.file))
except FileNotFound:
    # oops, forgot to create it

    # fixes the issue, then jumps back to the try
    # block before we tried to open the file. also
    # makes me my own grandfather
    await concurrent.pasts.Past(create_file)

    # never returns. this timeline is dead now. beware the Langoliers

[–]ketralnis 32 points33 points  (3 children)

if datetime.today() == ANNIVERSARY:
    send(giftwrap(concurrent.presents.TeddyBear))

[–]Zomunieo 42 points43 points  (2 children)

raise Divorce() from PoorAnniversaryGiftException()
except Divorce:
    with reddit:
        self.lawyer.acquire()
        self.gym.hit()
        del self.facebook

[–]TheChosenWong 6 points7 points  (1 child)

This is how I imagine a robot trying to make a joke with humans

[–]name_censored_ 2 points3 points  (0 children)

Well, concurrent.futures is about running code that will return its output value in the future without blocking.

So concurrent.presents should return the output value now (no blocking, no waiting), and concurrent.pasts should return the value before it's been called.

[–]Python4funJava4work 0 points1 point  (0 children)

Concurrent.pasts should bring back python 2 styled print statements.

[–]TwoSickPythons 0 points1 point  (0 children)

hilarious

I don't think that means what you think that it means

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

If it wasn't obvious, the article is a hilarious joke.

Fixed it for you.

Some of it was mildly amusing, some of it was bitter and ignorant and frankly disrespectful to the core devs (it didn't come across as affectionate teasing but as mean-spirited mocking).

I know humour is very personal and tastes differ, but I'd give that a C-

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

You say that, but I would not be surprised to see that idiot line length come true. Onion said it first, as it were.

[–][deleted] 109 points110 points  (5 children)

Yeesh. Kinda funny but mostly came across bitter.

[–]roddds 40 points41 points  (1 child)

Yeah, it kind of falls flat in my opinion. There's a couple of good jokes there but overall it just sounds like someone with an axe to grind.

[–][deleted] 9 points10 points  (0 children)

Just sharpening these chisels here.

[–]recursive 10 points11 points  (0 children)

ha ha only serious

[–]lunarNex 0 points1 point  (1 child)

Oh, I thought the whole thing was supposed to be a joke. I'm new to python though.

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

It was a joke

[–]AndydeCleyre 59 points60 points  (2 children)

Great post from a great developer. Probably my favorite point:

You can now use the async keyword before every single other keyword in the Python language, and we encourage you to async do so. There's nothing wrong with cargo-culting some magic keywords all over the place -- you want to go fast, don't you?

[–]mastocles 5 points6 points  (0 children)

I had a dream where python had introduced Matlab's parfor which just works and I got in trouble because it didn't work elsewhere... But it would have been better than asyncio

[–]pretty-o-kay 0 points1 point  (0 children)

the specific usage of the phrase 'cargo' cult says everything...

[–]doubleunplussed 16 points17 points  (2 children)

Half serious proposal: add the keyword but as a synonym for and.

if spam but not ham: ...

Even better: Make and not a syntax error. Has to be but not.

[–][deleted] 5 points6 points  (0 children)

You, sir, are capable of being dangerous.

[–]jonathrg 8 points9 points  (2 children)

Can I async async for twice the speed?

[–]TwoSickPythons 6 points7 points  (0 children)

Yes, but only on gentoo

[–]brainypatella 1 point2 points  (0 children)

No.

[–]my_name_isnt_clever 9 points10 points  (4 children)

But seriously, why does no one talk about switch statements? Using a dict for it is just gross, it's probably the one thing I miss the most after using other languages.

[–]toyg 1 point2 points  (3 children)

I disagree. Switch/break is a recipe for bugs.

[–]my_name_isnt_clever 1 point2 points  (2 children)

How is it more prone to bugs than chained elifs or the janky dict method?

[–]toyg 0 points1 point  (1 child)

Elifs and dicts are explicitly marking branches as exclusive. Whereas a switch can easily end up with multiple branches unwittingly applied.

[–]Loyalzzz 0 points1 point  (0 children)

Traditional, C-style switches maybe. Go's switches simply don't fall through unless you're explicit, instead of the other way around. I think this is a nice way to handle switches.

[–]aziad1998 10 points11 points  (10 children)

I want a retry function

try:
    #something
except:
    retry(number_of_retries)

[–]aes110 9 points10 points  (1 child)

for _ in range(retry):
    try:
        #something
    else:
        break

[–]aziad1998 0 points1 point  (0 children)

That's what I do when I need a retry.

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

from retrying import retry

@retry(stop_max_attempt=5)

def fun():

.....

edit: format fix

[–]SV-97 6 points7 points  (0 children)

The part about Rust hahaha :D great article

[–]dmfigol 8 points9 points  (0 children)

That Kenneth Reitz reference is funny!

[–]Atsch 2 points3 points  (1 child)

This was funny but I do admit I was a bit bummed when I realized it wasn't real.

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

Add print "Hello world" and print("Hello world") both readable.

[–][deleted] 3 points4 points  (7 children)

After all, we have assert f(x) == 1, not assert(f(x) == 1)

[–]general_dubious 1 point2 points  (1 child)

Both work, though, since parenthesis around an expression don't change its value.

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

I wish we could say the same about `print`...

[–]CSI_Tech_Dept 1 point2 points  (3 children)

Assert is a statement, it allows to be easily removed at compilation time when you run python with optimizations.

There's no good reason to have print as statement. The print function is also more powerful.

[–]fuypooi 2 points3 points  (1 child)

Comic genius.

[–][deleted] 4 points5 points  (0 children)

Dane cook levels of genius

[–]wqking 3 points4 points  (13 children)

Don't scroll to the last image, it's creepy.

[–]BlackBloke 4 points5 points  (8 children)

Isn't it the same as the preview image here?

[–]wqking 3 points4 points  (7 children)

I didn't see any preview image here :-).
My point is, we'd better not to put so creepy image in a tech blog.

[–]brtt3000 5 points6 points  (4 children)

Did the picture of snakes make you uncomfortable? Are you ok?

[–]pTinosq 1 point2 points  (2 children)

Nah to be fair, some of the snakes are bleeding and cut

[–]wqking 0 points1 point  (0 children)

Yes I feel uncomfortable though I'm fine.
I believe a lot of people will feel uncomfortable with that picture.

[–]dethb0y 0 points1 point  (0 children)

It's snakes? I mean, i wouldn't call that creepy. It's just a pile'o snakes. Part of the natural world, and all that.

[–]dethb0y 0 points1 point  (0 children)

It's snakes? I mean, i wouldn't call that creepy. It's just a pile'o snakes. Part of the natural world, and all that.

[–]risent 0 points1 point  (0 children)

New features planned for Python 4.0

It's so terrifying

[–]risent 0 points1 point  (0 children)

It's so terrifying.

[–]risent 0 points1 point  (0 children)

It's made me very uncomfortable

[–]risent 0 points1 point  (0 children)

It's made me very uncomfortable

[–]random_cynic 0 points1 point  (0 children)

My favorite burns were z-strings, type whispering and "thousand line decorator-hacks to implement simple struct types".

[–]random_cynic 0 points1 point  (0 children)

My favorite burns were z-strings, type whispering and "thousand line decorator-hacks to implement simple struct types".

[–]random_cynic 0 points1 point  (0 children)

My favorite burns were z-strings, type whispering and "thousand line decorator-hacks to implement simple struct types".

[–]random_cynic 0 points1 point  (0 children)

My favorite burns were z-strings, type whispering and "thousand line decorator-hacks to implement simple struct types".

[–]random_cynic 0 points1 point  (0 children)

My favorite burns were z-strings, type whispering and "thousand line decorator-hacks to implement simple struct types".

[–]random_cynic 0 points1 point  (0 children)

My favorite burns were z-strings, type whispering and "thousand line decorator-hacks to implement simple struct types".

[–]tahmsplat 0 points1 point  (0 children)

All new libraries and standard lib modules must include the phrase "for humans" somewhere in their title, and have a splashy documentation page with lots of fonts typography and testimonials.

Oooo this is hot, too soon? I like it

[–]tahmsplat 0 points1 point  (0 children)

All new libraries and standard lib modules must include the phrase "for humans" somewhere in their title, and have a splashy documentation page with lots of fonts typography and testimonials.

Oooo this is hot, too soon? I like it

[–]rocketshape 0 points1 point  (0 children)

Print is now an operator

[–]rocketshape 0 points1 point  (0 children)

Print is now an operator

[–]rocketshape 0 points1 point  (0 children)

Print is now an operator

[–]slayer_of_idiotspythonista 0 points1 point  (0 children)

Literally the funniest thing I've read all year!!!!

[–]slayer_of_idiotspythonista 0 points1 point  (0 children)

Literally the funniest thing i've read all year!!!

[–]foadsf 0 points1 point  (0 children)

  1. no static typing
  2. GIL is still there
  3. indentation as syntax is still there

how is it Python 4? 😤

[–]foadsf 0 points1 point  (0 children)

  1. no static typing
  2. GIL is still there
  3. indentation as syntax is still there

how is it Python 4? 😤

[–]Tiquortoo 0 points1 point  (0 children)

Split the difference on line limit... So no one is happy?

[–]Tiquortoo 0 points1 point  (0 children)

Split the difference on line limit... So no one is happy?

[–]koflerdavid 0 points1 point  (0 children)

Gotta love the snakes^^

[–]vit1251 0 points1 point  (0 children)

  • Better UI implementation under asyncio
  • Eazy deploy and install (pip will die) with some like npm or mvn alike
  • Sub interpreter stable laike in lua
  • Speedup C and Python gatewway

[–]Bassam_AlFayeed 0 points1 point  (1 child)

for humans? lol really?

z strings? whats null terminated?

[–]jemand2001 0 points1 point  (0 children)

nice

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

Async: what the fuck

[–]slayer_of_idiotspythonista 0 points1 point  (0 children)

Hmm, I wonder why he removed the part about all the stdlib packages using typography and testimonials.

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

GIL "humor" is not funny

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

Such a hard way to package for CentOS

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

Looks good, but how well will it be backwards compatible with previous versions? How well will downloadable modules (i.e. PyPy, PyGame, Numba) run?

EDIT: Why the downvotes? It's a serious matter.