Shawn Milochik schrieb:
Thanks. I wasn't aware of the property() function, but I read up on
it. I modified the Vessels.py file, but not the board file (except
where necessary to handle the changes made to Vessels. Is this better?

http://shawnmilo.com/ships/ships2/


Not really. The point about properties is that you *can* make attribute access trigger getter or setter code.

But not that you do unless there is an actual reason for that. The way you do it now is simply introducing clutter, without benefit. Your class would be half the current size - without loss of functionality.



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

Reply via email to