[Bf-python] Clearing single scriptlink

Stephen Swaney sswaney at centurytel.net
Mon Mar 21 02:08:51 CET 2005


On Sun, Mar 20, 2005 at 04:24:14PM -0800, Ken Hughes wrote:
> Stephen Swaney wrote:
> > 
> > 
> > If you are passing a variable number of arguments,
> > you probably want to do it as a list:
> > 
> > clearScriptLinks( [ "script1", "script2", "script3" ] )
> > 
> 
> This sounded cool, so I thought I'd try implementing it
> (took maybe 1 1/2 hours).  But after starting to work on
> it realized we need to define what it does a little more
> thoroughly:

Funny how details start to appear in a 'simple' problem, eh?

> * what happens if a "script2" isn't linked?  Ignore it,
>    throw an exception?

I would ignore it.  Putting it in the  clear list implies
that you don't want it linked.  If, when you are done,
it is not linked, you should be golden.  Not an error.

> * what if a script is linked more than once? can't think
>    why someone would want to do this, but it's possible.
>    Delete all occurances, just the first (or last)?

Delete them all.  Death to ScriptLinks!  If we need
some positional deleting behavior, we can always add it
later.

-- 
Stephen Swaney			
sswaney at centurytel.net




More information about the Bf-python mailing list