Simon Hibbs a écrit :
Great contributions, thanks both of you. I'm self-tought when it comes
to Python and OOP and I haven't yet grown an intuitive feel for how to
do things sensibly.
While part of the OO design patterns are mostly workaround for lack of
dynamism in languages like C++ or Java,
Ben Finney a écrit :
Simon Hibbs <[EMAIL PROTECTED]> writes:
Orriginaly I thought I'd need to have a hull object which contains
component objects, but the component objects need access to members
of the hull object (e.g. the hull size) so that looks messy to
implement.
Was it as messy as this
Great contributions, thanks both of you. I'm self-tought when it comes
to Python and OOP and I haven't yet grown an intuitive feel for how to
do things sensibly.
Simon
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 17, 6:50 am, Simon Hibbs <[EMAIL PROTECTED]> wrote:
> I'm rewriting a design application for a science fiction game. in it
> you design your own starships. Each component has a mass and cost, but
> the mass can either be fixed or it can be expressed as a percentage of
> the tonnage of the ov
Simon Hibbs <[EMAIL PROTECTED]> writes:
> Orriginaly I thought I'd need to have a hull object which contains
> component objects, but the component objects need access to members
> of the hull object (e.g. the hull size) so that looks messy to
> implement.
Was it as messy as this::
class Shi
I'm rewriting a design application for a science fiction game. in it
you design your own starships. Each component has a mass and cost, but
the mass can either be fixed or it can be expressed as a percentage of
the tonnage of the overall ship.
Orriginaly I thought I'd need to have a hull object wh