integer's methods

Lawrence D’Oliveiro lawrencedo99 at gmail.com
Thu Aug 18 17:38:44 EDT 2016


On Friday, August 19, 2016 at 12:59:09 AM UTC+12, ast wrote:
> I wonder why calling a method on an integer
> doesn't work ?

Sure it does.

    >>> 2 + 5
    7
    >>> (2).__add__(5)
    7



More information about the Python-list mailing list