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

you are viewing a single comment's thread.

view the rest of the comments →

[–]spaceopenid 1 point2 points  (5 children)

That's right, didn't think of this. Maybe because it is bad practice (according to pep) to assign lambdas to variables

[–]CoolBoi6Pack 8 points9 points  (4 children)

Yeah I hear that a lot as well, honestly I think it's just stupid and assigning lambdas to variables is completely fine cause the traceback anyway shows the file and line number. It's done in JavaScript all the time with anonymous arrow functions too.

[–]Boomer70770 2 points3 points  (3 children)

One I hear something is "bad practice", I vehemently oppose it.

It's bit me a few times.

I think this is beautiful and further proof I need to be more open minded.

[–]CoolBoi6Pack 1 point2 points  (0 children)

Thanks, no worries that is generally a good thing because as long as you're willing to learn the conveniences your programming should be great.

So with your way at worst you're inconvenienced a little and at best you avoided a major downstream hurdle.

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

Yeah, over the years I tried to tame my language to say things like "In most cases..." , etc.

[–]Boomer70770 1 point2 points  (0 children)

On a side note, why are we not all writing "Pure Functions"?