Skip to content

Method could be a function #130

Open
@hjp

Description

@hjp

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions