[SciPy-user] OpenOpt svn broken on Windows

Matthieu Brucher matthieu.brucher@gmail....
Wed Jul 16 11:47:58 CDT 2008


2008/7/16 dmitrey <dmitrey.kroshko@scipy.org>:
> Matthieu Brucher wrote:
>> Hi,
>>
>> As Alan states it, you could use a diffrent name. Why not use
>> algencan2_oo.py ?
> I don't think using r = p.solve('algencan2') is a good idea, even
> "algencan" is too long to type. Also, there is a number of those
> algencan 2.0beta, 2.0.1beta, ..., 2.0.4 beta and the number will continue.
>
> Also it means after new A. version I should remove old files each time,
> making some users code not working.

Algecan2 is supposed to have a clear interface, isn't it ? So you only
have one wrapper per major version. This is done in other packages as
well. And it is clearer that this is for algecan 2.x and not for
algecan 1.x.

>>  With the current registry pattern in OO, the name of
>> the solver is not dependent on the actual implementation file.
>>
> I don't understand what do you mean here, see runProbSolver.py, solver
> is extracting from py-file with same name.

It wasn't the case some time ago. But you still can do what I mean.
I see that you can't register a new solver in OO on the fly and use
your wrappers. Why didn't you make __solverPaths__ directly a
dictionary that you populate then ? This way, you always have one
__solverPaths__ that is not different accross modules, as it could be
expected to be.

>> Besides, you could resfactor the code by using some patterns, as Alan
>> suggested it ;)
>>
> I intend just to remove ALGENCAN_oo.py, because I don't see needs to
> continue it maintenance in future.

Of course ;) but you should try to reuse your code at the beginning as well ;)

Matthieu
-- 
French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn : http://www.linkedin.com/in/matthieubrucher


More information about the SciPy-user mailing list