| *** povbot has joined #zope3-dev | 13:02 | |
| *** flox|away is now known as flox | 13:02 | |
| *** baijum has joined #zope3-dev | 13:04 | |
| *** jinty has joined #zope3-dev | 13:05 | |
| *** baiju1 has joined #zope3-dev | 13:17 | |
| *** baiju1 is now known as baijum_ | 13:17 | |
| *** baijum has quit IRC | 13:25 | |
| *** J1m has quit IRC | 13:28 | |
| *** edgordon has quit IRC | 13:32 | |
| *** J1m has joined #zope3-dev | 13:33 | |
| *** baijum_ has quit IRC | 13:40 | |
| tlotze | Hi. | 13:58 | 
|---|---|---|
| tlotze | I've a question on zope.app.container. | 13:59 | 
| tlotze | In the doc tests of of zope.app.container.contained.setitem, it says that a container sets an item's __parent__ and __name__ and fires events unless the __parent__ and __name__ have already been set. | 14:00 | 
| tlotze | What's supposed to happen if the values are inconsistent, i.e. I do some_container["foo"] = bar where bar.__parent__ == other_container and bar.__name__ == "baz"? | 14:01 | 
| tlotze | In particular, what is supposed to happen if I add an item to a container twice, under different names? | 14:01 | 
| tlotze | Currently the values on the item are silently overwritten, but this doesn't feel like a good idea, and in any case it seems like an under-specified spot. | 14:02 | 
| mgedmin | I agree that it is horrifyingly underspecified | 14:04 | 
| mgedmin | however I have found the behaviour useful | 14:04 | 
| mgedmin | when you want to replace the container type with something else | 14:05 | 
| mgedmin | you can do | 14:05 | 
| mgedmin | new_container = MyContainerType() | 14:05 | 
| mgedmin | for key, value in old_container.items(): new_container[key] = value | 14:05 | 
| mgedmin | del old_container | 14:05 | 
| tlotze | right | 14:05 | 
| mgedmin | actually, I take the "horrifyingly underspecified" bit back | 14:06 | 
| tlotze | I wondered about all this in a similar case; in a zodb evolution, we rename an item: x["new name"] = x["old_name"]; del x["old_name"] | 14:06 | 
| mgedmin | the Pythonic thing is that code should be obvious and should not require the reading of documentation to understand what it does | 14:06 | 
| mgedmin | tlotze: the best thing to do is to write a test | 14:07 | 
| tlotze | sure | 14:07 | 
| mgedmin | or at least add assert x["new name"].__name__ == "new name" and x["new name"].__parent__ is x | 14:07 | 
| mgedmin | to the generation script itself | 14:07 | 
| mgedmin | but a unit test is better | 14:07 | 
| tlotze | I just wonder what happens if one doesn't use this "feature" like in our two examples, but adds the same object twice. That silently leads to inconsistencies. | 14:07 | 
| mgedmin | then when someone decides the current behaviour is a bug and merges the "bugfix" into the release branch, you'll notice | 14:08 | 
| *** gintas has joined #zope3-dev | 14:09 | |
| *** gintas has quit IRC | 14:09 | |
| *** gintas has joined #zope3-dev | 14:09 | |
| *** alga has joined #zope3-dev | 14:11 | |
| *** philiKON has quit IRC | 14:16 | |
| *** philiKON has joined #zope3-dev | 14:18 | |
| *** flox has quit IRC | 14:25 | |
| *** nathany has joined #zope3-dev | 15:03 | |
| *** romanofski has quit IRC | 15:22 | |
| *** romanofski has joined #zope3-dev | 15:23 | |
| *** niemeyer has joined #zope3-dev | 15:24 | |
| *** baijum has joined #zope3-dev | 15:43 | |
| *** benji has joined #zope3-dev | 15:46 | |
| *** flox has joined #zope3-dev | 15:50 | |
| *** baijum has quit IRC | 16:05 | |
| *** alecm has joined #zope3-dev | 16:26 | |
| *** zbir has quit IRC | 16:32 | |
| *** baijum has joined #zope3-dev | 16:36 | |
| *** oferw has joined #zope3-dev | 16:41 | |
| *** gumpa has joined #zope3-dev | 16:42 | |
| *** eins has quit IRC | 16:49 | |
| *** baijum has quit IRC | 16:58 | |
| *** philiKON has quit IRC | 17:01 | |
| *** oferw has quit IRC | 17:06 | |
| *** hdima has quit IRC | 17:21 | |
| *** scherand has quit IRC | 18:27 | |
| *** philiKON has joined #zope3-dev | 18:29 | |
| *** romanofski has quit IRC | 18:30 | |
| *** MJ has quit IRC | 18:32 | |
| *** alga has quit IRC | 18:52 | |
| *** ignas has quit IRC | 19:12 | |
| *** projekt01 has left #zope3-dev | 19:16 | |
| *** gumpa has quit IRC | 19:18 | |
| *** nathany has quit IRC | 19:19 | |
| *** gumpa has joined #zope3-dev | 19:19 | |
| *** flox has quit IRC | 19:31 | |
| *** hazmat has joined #zope3-dev | 19:49 | |
| *** ChanServ sets mode: +o hazmat | 19:49 | |
| *** gintas has quit IRC | 19:59 | |
| *** d2m has quit IRC | 20:14 | |
| *** d2m has joined #zope3-dev | 20:14 | |
| *** MJ has joined #zope3-dev | 20:21 | |
| *** ignas has joined #zope3-dev | 20:26 | |
| *** Aiste has quit IRC | 20:29 | |
| *** Aiste has joined #zope3-dev | 20:53 | |
| *** batlogg has quit IRC | 20:57 | |
| *** dobee has quit IRC | 21:00 | |
| *** kobold has left #zope3-dev | 21:02 | |
| *** nathany has joined #zope3-dev | 21:15 | |
| *** J1m_ has joined #zope3-dev | 21:18 | |
| *** J1m has quit IRC | 21:22 | |
| *** mkerrin has quit IRC | 21:31 | |
| *** tonico has quit IRC | 21:33 | |
| *** faassen has quit IRC | 21:34 | |
| *** MJ has quit IRC | 21:37 | |
| *** flox has joined #zope3-dev | 21:37 | |
| *** M1 has joined #zope3-dev | 21:37 | |
| *** batlogg has joined #zope3-dev | 21:45 | |
| *** hazmat has quit IRC | 21:53 | |
| *** hazmat has joined #zope3-dev | 21:54 | |
| *** ChanServ sets mode: +o hazmat | 21:54 | |
| *** Aiste has quit IRC | 21:58 | |
| *** dunny has joined #zope3-dev | 22:11 | |
| *** nathany has quit IRC | 22:15 | |
| *** fcorrea has joined #zope3-dev | 22:16 | |
| *** RaFromBRC has joined #zope3-dev | 22:17 | |
| fcorrea | Hi srs, quick q about views as actions of forms. I have a view called searchResults.html. I am trying to set this in my form like this tal:attributes="action context/@@searchResults.html" but I am getting a Bus error here. Am I missing something? | 22:23 | 
| Theuni | yup | 22:23 | 
| fcorrea | BTW-If I hard code the action="@@searchResults.html" it works | 22:23 | 
| Theuni | you don't want the view there, but the URL to the view | 22:23 | 
| fcorrea | mm....strange | 22:23 | 
| Theuni | context/@@searchResults.html *renders* the view, not determine it's url | 22:24 | 
| fcorrea | the view is registered to * | 22:24 | 
| fcorrea | ah | 22:24 | 
| Theuni | just doing @@searchResults.html should be fine though | 22:24 | 
| *** srichter has quit IRC | 22:25 | |
| philiKON | fcorrea, string:${context/absolute_url}/@@searchResults.html | 22:25 | 
| fcorrea | ok. Thanks. I thought the best way to do it was using TAL, but that's ok | 22:25 | 
| philiKON | if you want to be absolutely sure | 22:25 | 
| fcorrea | mmm | 22:25 | 
| fcorrea | philiKON: better one ;) | 22:25 | 
| philiKON | fcorrea, string:${context/@@absolute_url}/@@searchResults.html even | 22:25 | 
| fcorrea | thanks | 22:25 | 
| fcorrea | Theuni, philiKON Thank you guys | 22:26 | 
| Theuni | np | 22:29 | 
| *** ignas has quit IRC | 22:36 | |
| *** philiKON has quit IRC | 22:40 | |
| *** WebMaven has joined #zope3-dev | 22:53 | |
| *** srichter has joined #zope3-dev | 22:54 | |
| *** ChanServ sets mode: +o srichter | 22:55 | |
| *** mgedmin has quit IRC | 23:01 | |
| *** philiKON has joined #zope3-dev | 23:02 | |
| *** RaFromBRC has quit IRC | 23:07 | |
| *** dobee has joined #zope3-dev | 23:11 | |
| *** timte has quit IRC | 23:18 | |
| *** fcorrea has quit IRC | 23:21 | |
| *** M1 is now known as MJ | 23:25 | |
| *** romanofski has joined #zope3-dev | 23:39 | |
| *** J1m_ has left #zope3-dev | 23:57 | |
Generated by irclog2html.py 4.0.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!