Alex Martelli wrote:
> Carl Banks <[EMAIL PROTECTED]> wrote:
>    ...
>>>     class better_list (list):
>>>         tail = property(None, list.append)
>> This is an impressive, spiffy little class.
> 
> Yes, nice use of property.
> 
> Alex

I don't know, I usually see people considering that properties are 
"cool" as long as they don't have side effects, as long as they're 
virtual members.

The tail property doesn't behave like member data at all, the semantics 
are strange, counter-intuitive (tail would usually be the end of the 
list, either [-1] or [1:], in this case it's some magic position at the 
end of the list). And it has one hell of a side effect.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to