Dave Angel <[email protected]> writes:
> Ben is right, dunder methods don't belong in introductory texts.
[…]
> But he didn't show you the simplest fix:
>
> (-3).__abs__()
I disagree; the simplest fix is not to call that method directly, and
just use::
abs(-3)
--
\ “Computer perspective on Moore's Law: Human effort becomes |
`\ twice as expensive roughly every two years.” —anonymous |
_o__) |
Ben Finney
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor