[Tutor] OT How to approach problem ?

Alan Gauld alan.gauld at blueyonder.co.uk
Mon May 24 12:58:02 EDT 2004


> >The other normal approach is to pass the pointers in as parameters
of
> >
> I was concerned about speed, I would be passing a lot of data
through
> another layer of def.

Because Python only passes references to the objects there is
very little overhead in passing parameters, the real overhead
is the actual function call itself. Adding parameters makes
the code more reusable and safer and carries very little overhead.

> I guess the only way to find out the time penalty is to code it &
time
> it :-)

This is always a good idea when thinking about performance...

Alan G.




More information about the Tutor mailing list