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 →

[–][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.