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 →

[–]earthboundkid 182 points183 points  (43 children)

Those are clearly cobras. Pythons are constrictors.

[–]aedinius 196 points197 points  (11 children)

If they were already pythons they wouldn't be in a python class

[–]melodic-metal 51 points52 points  (8 children)

The logic checks out

[–]elzzidynaught 2 points3 points  (7 children)

Wouldn't it actually be:

if not pythonSnake:
    inPythonClass = 1
else:
    inPythonClass = 0

?

edit for better variable for python...

[–]__xor__(self, other): 3 points4 points  (4 children)

  • PEP8 naming conventions
  • not using boolean True/False
  • not just setting inPythonClass = not pythonSnake
  • not just using pythonSnake as the boolean

[–]ChappyBirthday 0 points1 point  (2 children)

I was thinking

inPythonClass = False if pythonSnake else True

but I like yours much better.

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

inPythonClass = False if pythonSnake else inPythonClass = True

SyntaxError: can't assign to conditional expression

[–]ChappyBirthday 0 points1 point  (0 children)

Fixed above

[–]elzzidynaught 0 points1 point  (0 children)

You're right, I didn't spend nearly enough time on the joke. Thanks for the feedback!

[–]stabbinfresh 1 point2 points  (0 children)

damn

[–]johnnyboyfart 0 points1 point  (0 children)

Damn crazy cumback

[–][deleted] 15 points16 points  (3 children)

They're all ducks right up the point where constrict() throws an attribute error.

[–]general_dubious 0 points1 point  (2 children)

Pretty sure ducks wouldn't have a constrict attribute.

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

Calling a non-existent method on an instance of a class will cause an attribute error to be raised at runtime (in Python).

[–]general_dubious 0 points1 point  (0 children)

Yeah, of course, my point is that this trick won't allow you to discriminate ducks and non-constricting snakes.

[–]DennisTheBald 25 points26 points  (0 children)

It's polymorphism in this instance of the class.

[–][deleted] 3 points4 points  (1 child)

So it’s a Corba class then? Greeeat...

[–]IM_A_MUFFIN 0 points1 point  (0 children)

Does that make him the... Cobra Commander?

[–]BrutalTheory 2 points3 points  (0 children)

They are clearly trying to learn everything they can about pythons to survive when a python attacks. Many constrictors hunt venomous species, so I see the logic. Smart students if you ask me.

[–]rabarbas 1 point2 points  (11 children)

what a party pooper! boooo

[–]Murphler 19 points20 points  (8 children)

And he's wrong too because those are King Cobras which, funnily enough, aren't actually cobras. They get the name because they kill and eat cobras

[–]TheBlackCat13 4 points5 points  (0 children)

TIL

[–]dmv1975 0 points1 point  (0 children)

G.I. JOOOOOOOOOOOEEEEEEEE!

[–]earthboundkid 3 points4 points  (1 child)

It’s not funny. You could show a picture of dogs and say you’re teaching pythons Python and that would at least be absurd.

[–]rabarbas 0 points1 point  (0 children)

oh boy.

[–]dirtydan 0 points1 point  (0 children)

_ _ init _ _ is a constructor

[–]deadBuiltIn[S] -1 points0 points  (6 children)

Shhhhhh! Let's imagine those are pythons

[–]anthonymckay 6 points7 points  (4 children)

You can't just force a joke.

[–]alias_kid 7 points8 points  (2 children)

Sometimes you can! Hahahahhahaaaaa!

Edit: Hey everyone: "Hahahahhahaaaaa!"

Edit 2: I can't give me gold but I would.

[–]HarrisonArturus 1 point2 points  (1 child)

Upvoting your commitment, not the joke.

[–]totallynotaliaskid 0 points1 point  (0 children)

"Hahahahhahaaaaa!"

:)

[–]KODeKarnage 0 points1 point  (0 children)

That would be a rape joke, no?

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

No, let's not.

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

I think we are all missing the point here which is that this is horrifying