En Wed, 10 Mar 2010 11:45:38 -0300, John Posner <jjpos...@optimum.net>
escribió:

As I promised/threatened, here's the *start* of a write-up on properties, aimed at non-advanced Python programmers:

   http://www.jjposner.net/media/python-properties-0310.pdf

I'd use 'function' instead of 'procedure', as this last word is very
uncommon in Python literature (also, "the procedure's return value..." may
look very strange to some people).

I'm unsure if one should make a distinction 'storage attribute' vs.
'method attribute', or even if it makes things actually more clear. I
think you could present the motivating idea first ("I want to execute some
code when accessing an attribute") and only later talk about properties
and descriptors (as written, the reader still doesn't know how to define a
simple property and you've already talked about deleting attributes...)

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to