x=something, y=somethinelse and z=crud all likely to fail - how do i wrap them up

Steven D'Aprano steve at pearwood.info
Sun Jan 31 02:22:32 EST 2016


On Sun, 31 Jan 2016 03:58 pm, Veek. M wrote:

> Is there some other nice way to wrap this stuff up?

The answer to "how do I wrap this stuff up?" is nearly always:


- refactor your code so you don't need to;
- subclass and extend the method;
- write a function;
- write a delegate class.


Pick whichever is more relevant to your specific situation.


-- 
Steven




More information about the Python-list mailing list