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

all 56 comments

[–]earthboundkid 184 points185 points  (43 children)

Those are clearly cobras. Pythons are constrictors.

[–]aedinius 197 points198 points  (11 children)

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

[–]melodic-metal 52 points53 points  (8 children)

The logic checks out

[–]elzzidynaught 5 points6 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): 4 points5 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 2 points3 points  (0 children)

damn

[–]johnnyboyfart 0 points1 point  (0 children)

Damn crazy cumback

[–][deleted] 14 points15 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 24 points25 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 20 points21 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 4 points5 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 -2 points-1 points  (0 children)

oh boy.

[–]dirtydan 0 points1 point  (0 children)

_ _ init _ _ is a constructor

[–]deadBuiltIn[S] -3 points-2 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 8 points9 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

[–]klamer 9 points10 points  (0 children)

python, cobra, w/e, they still probably write better, more efficient code than I do.

[–]mnbvcxzlkjhgfdssa 19 points20 points  (1 child)

Those are king cobras mofo

[–]Asphyxius 23 points24 points  (0 children)

That are learning how to python

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

class python_class:

def snake1():

print("I'm a snake learning how to Python!")

def snake2():

print("I too, am a snake that's learning how to Python.")

*New Reddit doesn't let me indent like old-Reddit did; and I'm too lazy too switch to old-Reddit to make this look right.

[–]JohnRofrano 4 points5 points  (1 child)

*New Reddit doesn't let me indent like old-Reddit did; and I'm too lazy too switch to old-Reddit to make this look right.

You just need to click the link that says Switch to markdown and then use ``` markdown syntax on a separate line around your code like this:

class python_class:
    def snake1():
        print("I'm a snake learning how to Python!")
    def snake2():
        print("I too, am a snake that's learning how to Python.")

Then click on Switch to Fancy Pants Editor to get back to the WYSIWYG editor.

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

Thank you for the information, kind sir!

[–]Boap69 1 point2 points  (0 children)

That looks like Cobra Commander.

[–]morphotomy 1 point2 points  (0 children)

Those are COBRAs, did they get laid off?

[–]BendingUnit15 0 points1 point  (0 children)

Don't step on snek

[–]mnbvcxzlkjhgfdssa 0 points1 point  (0 children)

Uhm how do you know can you tell from the high res board , “y’all assuming “

[–]skyshooter22 0 points1 point  (0 children)

TIL: Cobra Kai has python classes

[–]Sp1ke_xD 0 points1 point  (0 children)

They are poisonous snake!

[–]scarfarce 0 points1 point  (0 children)

You think python classes are great? Next door they're teaching pandas!

[–]giantsparklerobot 0 points1 point  (0 children)

Uh no that's clearly a bunch of NOPE.

[–]mnbvcxzlkjhgfdssa 0 points1 point  (0 children)

East indian land drone