Hi There,

It's not clear to me from the documentation if the following behavior is a bug
or a known bad use of cached method:

class Bla(object):
    @cached_method
    def truc(self):
        print "Computing truc"
        return 1
    trac = truc

sage: b = Bla()
sage: b.truc()
Computing truc
1
sage: b.truc()
1
sage: b.truc()
1
sage: b.trac()
Computing truc
1
sage: b.trac()
Computing truc
1
sage: b.trac()
Computing truc
1

If it is not considered as a bug, I think the documentation should make it
clear that it is a misuse and what is the correct (and fastest) way to write
it.

Cheers,

Florent

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to