decorator on update_once block

11 views
Skip to first unread message

David Peng

unread,
May 19, 2023, 7:54:54 AM5/19/23
to pymtl-users
Hi, 

I tried to add decorator to an update_once block. However I found my added decorator can't be outside update_once but have to inside.

#this works
@update_once
@my_dec
def block()
#this doesn't work
@my_dec
@update_once
def block()

I don't know whether this is a bug or feature.

Thanks,

David

Christopher Batten

unread,
May 19, 2023, 8:03:26 AM5/19/23
to David Peng, pymtl-users
Hmmm … not sure if we have ever tried that. Sounds like you figured out a way to make it work though?

Best,
Chris

Sent from my iPhone

On May 19, 2023, at 7:55 AM, David Peng <davi...@gmail.com> wrote:

Hi, 
--
You received this message because you are subscribed to the Google Groups "pymtl-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pymtl-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pymtl-users/1c6f26e2-a3a4-46de-a336-fb05a44e2b49n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages