On 3/27/2010 7:28 AM, Jonathan Hartley wrote:
On Mar 26, 6:26 pm, Luis M. González<luis...@gmail.com>  wrote:

But defining and then calling the function like that is a tad
cumbersome. So I was wondering about:



x = 1
class account_for_non_square_pixels:
   ((some complex logic))
y = 2


I don't exactly like this, but I think you can see what I'm getting
at. Does this fall down in some way I haven't grasped?

The assignments within the class are performed within a new local namespace. So moving non-toy code within a class block will typically fail.


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

Reply via email to