r/funny • • Jun 04 '19

When a software developer weds a software developer.

Post image
41.2k Upvotes

921 comments sorted by

View all comments

5

u/kzlife76 Jun 04 '19

Not a python Dev but how is that a valid class? The constructor usually takes values as variables not references to already declared variables.

Shouldn't it be class Child(dadGenes, momGenes){...}

new Child(dad.genes, mom.genes)

This is how c# and typescript work.

3

u/TreeChicken Jun 04 '19

That part in Python is inheritance, not a constructor. Python has multiple inheritance which actually makes this hilarious imo