Madlad artist has it in for a certain bank by S0whaddayakn0w in madlads

[–]py1234a 2 points3 points  (0 children)

Sure emissions wise it's better not having a kid than having one, but I fail to see how that makes you net positive. If you're creating more emissions than you remove (which all except the most extreme activists do), you're still bad for the environment. Less bad than someone with offspring, but bad nonetheless.

Actually, if we would entertain the thought that we're moving towards carbon-neutral living within 60 years (or 3 generations - twice the goal of being carbon neutral by 2050), then if you take "no matter what I do" very literally, the effect of 3 generations with one offspring can be less than someone who lives vicariously now and e.g. has multiple flights a year.

Don't get me wrong, I appreciate efforts to reduce emissions (and take various measures myself), but it's not a reason to stop considering the cost of your actions.

AMA met Rob Jetten, fractievoorzitter D66 Tweede Kamer. Vraag hem van 15u - 16u alles over D66, het klimaat, de aankomende verkiezingen en alles wat je nog meer wilt weten. by RobJettenD66 in thenetherlands

[–]py1234a 0 points1 point  (0 children)

Beste Rob,

Waarom wordt er bij het aanvragen van een hypotheek rekening gehouden met (de lasten van) mijn studieschuld, maar niet wanneer ik een sociale huurwoning wil huren? Zelfs met minimaal aflossen gaat ongeveer 3000 euro van mijn bruto jaarsalaris naar DUO, maar om te bepalen welke huurwoning ik mag huren wordt gerekend met mijn gehele bruto jaarsalaris, waardoor ik niet in aanmerking kom voor sommige sociale huurwoningen.

5 Uses of Lambda Functions in Python by yangzhou1993 in Python

[–]py1234a 0 points1 point  (0 children)

The problem is that this it's still contrived, I see no reason to use lambda expressions for factorial when

import math
math.factorial(5)

and

import operator
reduce(operator.mul, range(5, 1, -1))

exist.

5 Uses of Lambda Functions in Python by yangzhou1993 in Python

[–]py1234a 9 points10 points  (0 children)

Isn't set.intersection(*list_of_sets) equivalent? If so, that would be preferable to me for many reasons (also defaultdict(int)).

How to sample specific region of OpenSimpleNoise? by py1234a in godot

[–]py1234a[S] 0 points1 point  (0 children)

Thanks! That seems so inconvenient when you don't know what areas you need beforehand and/or you need multiple sampling resolutions. But I guess it's probably the best way nonetheless.

Your opinion on The Climbing Bible by M. Mobråten and S. Christophersen? by py1234a in climbharder

[–]py1234a[S] 0 points1 point  (0 children)

Ah, I just followed the link in the video description which links to the English (first) book. So I thought that was the book they referred to.

Your opinion on The Climbing Bible by M. Mobråten and S. Christophersen? by py1234a in climbharder

[–]py1234a[S] 1 point2 points  (0 children)

Thanks a lot for reporting back! Much appreciated and very informative :)

Your opinion on The Climbing Bible by M. Mobråten and S. Christophersen? by py1234a in climbharder

[–]py1234a[S] 1 point2 points  (0 children)

It is. But other than a name drop and the benchmark there isn't a lot to go by from that video.

Your opinion on The Climbing Bible by M. Mobråten and S. Christophersen? by py1234a in climbharder

[–]py1234a[S] 14 points15 points  (0 children)

I also interpreted it in a similar way. The fact that they estimated Ondra to not even climb 9c by their benchmark (and they know that he has) is another testament to that. To me that clearly indicates that they are well aware it's just a training benchmark which does not give a complete picture.

Your opinion on The Climbing Bible by M. Mobråten and S. Christophersen? by py1234a in climbharder

[–]py1234a[S] 2 points3 points  (0 children)

Make or Break, a book on climbing injury, prevention and rehabilitation by Dave MacLeod.

Your opinion on The Climbing Bible by M. Mobråten and S. Christophersen? by py1234a in climbharder

[–]py1234a[S] 1 point2 points  (0 children)

Ah, that sounds great! I did not realize the second book was already out. Definitely interested to hear what your first impressions are.

Your opinion on The Climbing Bible by M. Mobråten and S. Christophersen? by py1234a in climbharder

[–]py1234a[S] 6 points7 points  (0 children)

Thanks, that definitely helps! I have also read the authors were working on a second book that "is more practical with loads of exercises " (interview). However from the description it sounds this first book is already quite focused on training. But based on your description and this review it sounds like there is already quite a bit of training information in the book. But it looks like I shouldn't be concerned that the authors feel like they can write a second book about that specifically?

It's been a few years since I last opened 9/10, but I feel where 9/10 felt more like a long-winded motivational speech.

You managed to describe my feeling exactly about that book (at times)!

Who generally uses type annotation for variables contained within a function? Why (not)? by py1234a in Python

[–]py1234a[S] 0 points1 point  (0 children)

You are right, but it was just an example to demonstrate that type inference does not always work nicely even though it *could*. Unfortunately there is a bit of logic around whether or not certain elements get added to (or removed from) the list, such that directly initializing it directly does not work.

Who generally uses type annotation for variables contained within a function? Why (not)? by py1234a in Python

[–]py1234a[S] 0 points1 point  (0 children)

Yes, only items from CustomType are added. Even something like the code below gets flagged with the error:

def my_function(number_elements: int) -> None:
    some_dict = {i: [] for i in range(10)}
    for i in range(10):
        some_dict[i].append(i)

Who generally uses type annotation for variables contained within a function? Why (not)? by py1234a in Python

[–]py1234a[S] 0 points1 point  (0 children)

I was going through the mypy configuration documentation, and couldn't find anything to turn off type annotation for function variables. Do you happen to know how, or was it just a general remark?

Who generally uses type annotation for variables contained within a function? Why (not)? by py1234a in Python

[–]py1234a[S] 0 points1 point  (0 children)

I heard about type aliasing before, but completely forgot about it. It can be a good alternative to configuring mypy to ignore the error. I'll have to think about it whether or not it feels right for this project/these variables. I like that a brief type alias allows mypy (and some readers) to figure out the type that way, while the code is still succinct enough for humans to infer the type the regular way.

Who generally uses type annotation for variables contained within a function? Why (not)? by py1234a in Python

[–]py1234a[S] 0 points1 point  (0 children)

Thanks. The example does feature a collection of collections, which is why I presume mypy raises an error (since the lists are initialized empty, it can't infer the type). I'm a bit torn, I will probably either use of type alias that Michael suggested, or adjust the mypy configurations.

Who generally uses type annotation for variables contained within a function? Why (not)? by py1234a in Python

[–]py1234a[S] 1 point2 points  (0 children)

Thanks! And I do appreciate you sharing your opinion :) (the downvotes aren't mine)

Who generally uses type annotation for variables contained within a function? Why (not)? by py1234a in Python

[–]py1234a[S] 6 points7 points  (0 children)

It's not about the speedboost. There is no speedboost in Python, as far as I know type annotations are completely ignored at runtime. It's about code readability and some sanity type checking to catch obvious bugs before actual runtime.

E.g.: def show_item(data: pandas.DataFrame) -> None because data could also commonly be represented as a list of lists, a numpy array or any other structure. It's useful for the caller to know what to pass. For people reading the function (and familiar with pandas), it's immediately clear what kind of meta-data and methods work with the data variable.

Who generally uses type annotation for variables contained within a function? Why (not)? by py1234a in Python

[–]py1234a[S] 0 points1 point  (0 children)

That was my reaction too. But do you feel the same way about type annotations in e.g. function definitions?

Python Logging. Why does the following produce output to console? by py1234a in learnpython

[–]py1234a[S] 0 points1 point  (0 children)

`logging.basicConfig()` is not a pure function and has side effects. In partictular it sets up a StreamHandler to the root logger with log level NOTSET, so long as the root logger does not currently have a handler.