[Python-ideas] Extending properties to sequence-like behavior

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Apr 6 23:29:22 CEST 2011


Dan Baker wrote:

> The "get all" function no longer works exactly as above, though;
> box.Items would instead return the ListProp object. This can be solved
> by using __call__ on the ListProp as the "get all" method;

Alternatively you could make box.Items[:] call GetAllItems.

-- 
Greg



More information about the Python-ideas mailing list