Wow. Really neat stuff there. memoize seems especially cool since you
can get lots of nice dynamic programming benefits "for free" (sorry if
I just stated the obvious, but I thought was was especially cool.)
Michele Simionato wrote:
> Gabriel Genellina wrote:
> > see this article by M. Simoniato
Thanks so much for your reply. You've definitely helped me a great
deal on this. Your comment about the difference between define time and
instantiation time cleared things up more than anything, and that also
helped clear up the confusion I was having about "self".
I think the places I've seen d
"Michele Simionato" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> Gabriel Genellina wrote:
>> see this article by M. Simoniato
>> http://www.phyast.pitt.edu/~micheles/python/documentation.html for a
>> better
>> way using its decorator factory.
>
> Actually the name is Simio
"Colin J. Williams" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> Gabriel Genellina wrote:
>> As said in the beginning, there is no use for decorators as methods
>> (perhaps
>> someone can find a use case?)
> Except, perhaps to indicate to the script reader that the decorat
Gabriel Genellina wrote:
[snip]
> As said in the beginning, there is no use for decorators as methods (perhaps
> someone can find a use case?)
Except, perhaps to indicate to the script reader that the decorator only
applies within the class?
Colin W.
> If you move the example above inside the cl
Gabriel Genellina wrote:
> see this article by M. Simoniato
> http://www.phyast.pitt.edu/~micheles/python/documentation.html for a better
> way using its decorator factory.
Actually the name is Simionato ;)
I have just released version 2.0, the new thing is an update_wrapper
function similar to th
"MR" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> I have a question about decorators, and I think an illustration would
> be helpful. Consider the following simple class:
>
> #begin code
> class Foo:
>def fooDecorator(f):
>print "fooDecorator"
>
>def _f(
Hello All,
I have a question about decorators, and I think an illustration would
be helpful. Consider the following simple class:
#begin code
class Foo:
def fooDecorator(f):
print "fooDecorator"
def _f(self, *args, **kw):
return f(self, *args, **kw)
retur