/srv/irclogs.ubuntu.com/2015/11/20/#launchpad-dev.txt

cjwatsonwgrant: Do you know if anyone's ever looked at making it easier to rename properties in Storm?  I'm considering writing a thing where you could say e.g. class Person: displayname = RenamedProperty("display_name"), with a __get__ method such that both Person.displayname and Person.display_name would DTRT in Storm queries13:50
cjwatsonwgrant: It ought to be possible to give it a .setter like the one on the stdlib's property(), so that we could have a renamed property with a custom setter - useful for the Person.name work13:51
cjwatsonThough in the latter case we kind of don't really want to rename it in an ideal world, it would be better to simply be able to set custom setters on storm properties13:52
cjwatsonwgrant: Actually, I suppose you can effectively do custom setters (assuming that they end up storing a value at all) with a validator.  So do we actually need to do the Person.name renaming that you were talking about?14:15
=== BradCrittenden is now known as Guest42648
wgrantcjwatson: Hm, did I suggest renaming Person.name?22:36
wgrantcjwatson: It needs to be significantly reworked due to the fact that it's impossible in some cases and involves API calls in others, but it doesn't obviously need to be renamed.22:37
cjwatsonwgrant: Not renaming as such, but you were talking about putting a setter on it and seeing whether things still work22:37
cjwatsonWhich I was initially taking to mean renaming to _name and adding @property name22:37
wgrantOh, no.22:37
wgrantI did that weeks ago with a validator and got it down to 13 broken tests.22:37
cjwatsonAha22:38
cjwatsonI'd still like to explore easier property renaming, but in that case just not for this particular job22:38
cjwatsonIt's very annoying that renaming Person.displayname to Person.display_name entailed going through and hunting for Storm queries22:39
wgrantIt is.22:40

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