[EMAIL PROTECTED] wrote:
> Thx
> but is there any simpleir way, if using not class, but just struct (or
> something like that, MATLAB equivalent for that one)?
Use this::
>>> A = type('', (), {})
>>> a = A()
>>> a
<__main__. object at 0x009E8490>
>>> a.foo = 42
>>> a.foo
42
But perhaps usin
Thx
but is there any simpleir way, if using not class, but just struct (or
something like that, MATLAB equivalent for that one)?
I'm thinking of rewriting some optimization solvers (non-smooth,
constrained, with (sub)gradients or patterns provided by user) to
Python and I don't know currently is it
[EMAIL PROTECTED] wrote:
> Thx
> but is there any simpleir way, if using not class, but just struct (or
> something like that, MATLAB equivalent for that one)?
> I'm thinking of rewriting some optimization solvers (non-smooth,
> constrained, with (sub)gradients or patterns provided by user) to
> P
Thx
but is there any simpleir way, if using not class, but just struct (or
something like that, MATLAB equivalent for that one)?
I'm thinking of rewriting some optimization solvers (non-smooth,
constrained, with (sub)gradients or patterns provided by user) to
Python and I don't know currently is it
[EMAIL PROTECTED] wrote:
> I have
> class A:
> def __init__(self, objFun, x0):
> #(I want to have self.primal.f = objFun)
> #both
> self.primal.f = objFun
> #and
> self.primal = None
> self.primal.f = objFun
None is a singleton, so if Python were to