You're viewing a single thread.
This, folks, is why global definition of variables can lead to your untimely demise.
91 0 ReplyYeah you gotta scope dat shit.
No way the Ent-D rolled off the line with global vars for everything, was this before or after O'Brien transferred off the ship?
3 0 ReplyExactly what I bring up when argumentative people show up with any of the inane food definitions "hot dog is sandwich" or "milkshake is soup" and what not.
18 0 ReplyHot dog is taco.
1 0 ReplyBut is corn grass?
8 0 Reply"Pizza is an open-face sandwich" ~Madlad Lemmyor (lemmyite? Lemm? Lemmor? Just what do we call users of Lemmy anyways???) from a couple weeks ago
3 0 ReplyI see "Lemmings" a lot and fairly like that
16 0 ReplyOr "Fedizens" if we want to be inclusive of other members of the Fediverse, like Mbin, Piefed, Tesseract (well, technically that's just a GUI for Lemmy iirc), and soon Sublinks.
But it does seem less playful than Lemmings:-P.
1 0 Reply
def hot(temp: int = 340): return temp
That way Bev can define temp however she needs, but if Picard doesn't specify, he gets his tea at a nice drinkable Kelvin temp.
8 1 ReplyIf you're just going to define a variable and then return it there's no reason to do it in a function.
1 0 ReplyShouldn't that be a float?
2 0 ReplyPython is dynamically typed, so you could just go against the type hint like an animal. But yes, probably.
7 0 ReplyIf you want to write Python like a caveman, then sure
1 1 Reply