IRC Logs for #circuits Wednesday, 2014-09-24

pdurbinmorn'n and gn8 cancel each other out00:23
*** Osso has quit IRC00:33
prologicso they do :)01:00
*** koobs has quit IRC06:09
*** koobs has joined #circuits06:35
prologiceven'n all07:29
*** Osso has joined #circuits08:24
*** Romster has quit IRC09:09
*** Romster has joined #circuits09:16
*** circuits has joined #circuits09:19
*** circuits has quit IRC09:19
*** Osso has quit IRC11:23
Yamahi15:06
*** Osso has joined #circuits16:50
*** Workster has quit IRC19:08
*** Workster_ has joined #circuits19:08
cfarmerhi all20:20
cfarmeranyone know if it’s possible to addHandler on a bound method dynamically?20:21
cfarmersomething like this doesn’t work because we can’t set attributes on a bound method, and `handler` tries to do `f.handler=True`:20:21
cfarmer`instance2.addHandler(handler(“event”, channel=instance1.channel)(instance2.method))`20:21
cfarmerI can get this to work by not relying on `addHandler` and `handler` and basically reimplementing whey they are doing without the use of method attributes, but it feels really hacky, and requires subclassing Component (or creating a generic function) :-(20:24
cfarmerso before i go that route, just wondering if i’m missing something obvious that i should try?20:25
prologiccfarmer, yes -- but refer to it's function instead20:45
prologicor make it a @classmethod I think20:45
prologicwe do it sometimes (rarely) :)20:45
cfarmerprologic ah ok, that makes sense… but if i make it a @classmethod is that going to affect all instances?20:46
cfarmergrabbing its function should probably work ok20:47
cfarmerawesome, its seems like this works: `instance2.addHandler(handler(“event”, channel=instance1.channel)(instance2.method.__func__))`20:48
prologicwell no it won't affect other instnaces afaik20:58
prologicbut it will let you dynamically use it as an event handler :)20:58
prologicor just make it a regular function outside of the class20:58
prologicyeah20:59
prologic.__func__ works20:59
prologicor should :)20:59
cfarmerseems to be with the minimal tests i’ve setup21:01
prologic*nods*21:06
*** ninkotech_ has quit IRC21:57
Yamagn822:04
*** Osso has quit IRC22:46

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!