[Python Wpg] Swapping object attribute values

Sydney Weidman syd at plug.ca
Fri Feb 27 07:42:53 EST 2009


On Thu, 2009-26-02 at 08:38 -0600, Stuart Williams wrote:
> Not knowing the context of your call to transpose, I wonder if instead
> of writing
>   anObject.transpose('field1', 'field2')
> why you wouldn't just write this:
>   anObject.field1, anObject.field2 = anObject.field2, anObject.field1
> 
> Stuart.

Probably makes more sense to do it that way. Simple is better than
complex *and* Flat is better than nested.

Thanks!

- Syd





More information about the Winnipeg mailing list