Re: Py 2.5 on Language Shootout

2007-01-19 Thread pgarrone
Isaac Gouy wrote: > [EMAIL PROTECTED] wrote: > > Alioth is a great site for selecting the language in which to implement > > primitives. Usually it's C. > > And for selecting a language for which you might need to implement > primitives in C :-) Well if you like C so much, just do it in C. ":-)"

Re: Py 2.5 on Language Shootout

2007-01-19 Thread pgarrone
Alioth is a great site for selecting the language in which to implement primitives. Usually it's C. Two of the alioth benchmarks, Partial-sums and Spectral-norm, could be done using Numarray, or would be done with Numarray if most of the program was in Python and there was a need to implement a si

Re: mutable numeric type

2007-01-02 Thread pgarrone
Way to go. Try doing this. x = MutableNumeric(42) y = x x += 42 print y -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding an instance to a data tree

2006-12-19 Thread pgarrone
And of course the solution occurs to me about 30 minutes after posting, to have the add method return an instance which then invokes setup. self.add(name, child_type, other_info).setup(child-setup-parameters) -- http://mail.python.org/mailman/listinfo/python-list

Adding an instance to a data tree

2006-12-19 Thread pgarrone
Hi, I have a data tree. A node in the tree "assembles" itself when called upon to do so by the level-of-detail algorithm. It creates and adds its children to itself using a base class method called "add". However in the pseudo-constructor called "setup", the child node needs to be already linked i

Re: handling many default values

2006-11-11 Thread pgarrone
Alan Isaac wrote: > > At Friday 10/11/2006 14:11, Alan G Isaac wrote: > > >class Params: > > > def __init__(self,**kwargs): > > > #set lots of default values > > > ... > > > #set the deviations from defaults > > > self.__dict__.update(kwargs) > > > > > >Is