magicmethods icon indicating copy to clipboard operation
magicmethods copied to clipboard

Rewrite of descriptor section

Open brandjon opened this issue 11 years ago • 0 comments

I rewrote the descriptor example and prose.

The previous Meter/Foot example, as written, stored the state in the descriptor object rather than the instances of the Distance class. This means that all Distances would have the same state, which is clearly undesirable. I also got rid of the meter descriptor, turning it into a regular attribute and making feet a view over meters. I think this more clearly illustrates how descriptors can be used.

I changed the prose to be more precise, trying not to increase verbiage.

I regenerated the documentation as mentioned in the project readme, but it also regenerated other changes prior to mine, and formatted the output differently from what was already there. So I put the document regeneration in a completely separate commit in case you want to ignore it.

brandjon avatar Dec 16 '13 04:12 brandjon