[03:17:29] ** bitmvnch has left IRC () [04:03:19] [connected at Mon May 15 04:03:19 2006] [04:03:19] <> *** Looking up your hostname... [04:03:20] <> *** Checking ident [04:03:22] <> *** Found your hostname [04:03:50] <> *** No identd (auth) response [04:03:50] <> *** Your host is kornbluth.freenode.net[freenode.freenode.net/6667], running version hyperion-1.0.2 [04:03:50] [I have joined #peak] [10:04:01] ** bitmvnch has joined us [11:05:51] whit|out is now known as whit [11:50:57] ** pje has joined us [13:29:42] ** bitmvnch has left IRC () [13:31:21] ** bitmvnch has joined us [13:34:13] ** whit has left IRC () [13:39:40] ** whit has joined us [13:53:04] whit is now known as whit|reboot [13:53:38] ** whit|reboot has left IRC () [14:04:19] ** whit has joined us [15:21:42] ** erikrose has joined us [15:22:57] pje: please don't run away; I have a models question. :-) [15:24:11] ok [15:24:38] I'm hoping to make my O-R mapping framework pay attention to the isChangeable attributes of model features. [15:24:58] (Right now, I just have the developer list a bunch of field names in a readOnlyFields tuple within the DM.) [15:25:35] I'm trying to figure out how to traverse to the isChangeable attribute, given a DM instance and a feature name. [15:25:50] Can I get there from here? [15:26:27] No [15:26:34] Crap. [15:26:47] Unless the DM knows the class of all items it will return, of course [15:27:01] Okay, what if I had `ob` (in peak.model parlance) too? [15:27:03] because you need to go from element class->feature->isChangeable [15:27:22] oh sure, that stuff is in the object's class's mdl_features [15:27:35] you just want to get the feature object and look at its isChangeable [15:27:47] Is mdl_features a dict? I forget... [15:28:00] Fire up the interpreter and see. [15:28:05] i.e., I forget too. :) [15:28:08] heh [15:28:11] * erikrose fires. [15:30:15] Okay, it looks like mdl_features just gives me a tuple of feature *names*. [15:30:17] How do I get at the features themselves without having them resolve into their values? [15:30:45] Oh, wait. [15:31:15] It gives me the features after all. [15:31:39] I still don't know how to get from feature-name to feature, though. [15:32:10] I guess I could get both mdl_featureNames and mdl_features and make my own map. Can you think of a better way? [15:48:05] getattr(ob.class, featureName) [16:06:33] Mmm, delicious. Thanks. [16:06:44] Thanks a whole lot. [16:08:30] ob.__class__, you meant, aye? [16:51:58] yeah [17:21:20] ** erikrose has left IRC () [20:08:41] ** pje has left IRC ("Client exiting") [22:06:05] ** erikrose has joined us [23:04:27] ** bitmvnch has left IRC (Read error: 104 (Connection reset by peer)) [23:24:24] ** erikrose has left IRC ()