Open
Description
I couldn't get python (neither 2.7, nor 3.5 or 3.7) to raise a Method could be a function
error on your example (or reasonable variations, like actually calling Rectangle.area). If this is obsolete, please update the page to describe the behaviour of current python versions. Otherwise, update the example to reproduce the error.
Also, you refer to self
and cls
as keywords. At least in Python 3 they aren't. There is just a (pretty strong) convention to call the first parameter of an instance method self
and the first parameter of a class method cls
.
Metadata
Metadata
Assignees
Labels
No labels