How do I chain methods?
prologic at shortcircuit.net.au
Mon Oct 25 05:31:48 CEST 2010
On Mon, Oct 25, 2010 at 9:39 AM, James Mills
<prologic at shortcircuit.net.au> wrote:
> Function/Method Chaining is probably used a lot in Python itself:
>>>> x = 4
> The implementation of many common operators return self (the object
> you're working with).
My apologies, this was a terribly example! int is immutable and
__add__ nor __sub__ return self :)
-- James Mills
-- "Problems are solved by method"
More information about the Python-list