2008-6-11
| 16:14 | SimonW | will try to be back on IRC around same time tomorrow (busy evening coming up) |
| 16:14 | brosner | talk to you later SimonW |
| 16:14 | jkocherhans | cool. I'll try to look at your email again so I can discuss |
| 22:05 | jdunck_ | hey, all-- i'm working to make SessionBase more dictionary-like |
| 22:06 | jdunck_ | anyone feel comfortable answering an opinion question on that? |
| 22:06 | jdunck_ | adding .update and trying to decide whether to leave SessionBase.accessed == True |
| 22:20 | Gulopine refreshes his memory on SessionBase | |
| 22:22 | jdunck_ | Gulopine: basically, .accessed is a marker for whether anything accessed anything in SessionBase |
| 22:22 | jdunck_ | used for emitting Vary: Cookie |
| 22:23 | jdunck_ | using SessionBase._session loads the backend data and sets .accessed = True, but I'm pretty sure .update shouldn't count as an access |
| 22:23 | jdunck_ | |
| 22:23 | jdunck_ | eh? |
| 22:24 | jdunck_ | tests don't seem to suggest that .modified == True should imply .accessed == True |
| 22:25 | jdunck_ | see SessionBase._get_session |
| 22:26 | Gulopine | sorry, also in the middle of dinner :) |
| 22:27 | jdunck_ | np |
| 22:32 | Gulopine | hrm |
| 22:32 | Gulopine | i suppose that is a good question |
| 22:33 | Gulopine | so the idea is that .accessed is more about reading, while .modified is about writing? |
| 22:50 | jdunck_ | Gulopine: yeah, so far as i can tell, .accessed just controls middleware emmission of Vary: Cookie, while .modified controls whether SessionBase.save gets called. |
| 23:00 | Gulopine | in that context, i would agree with you, but there's one other side of it to consider, i think |
| 23:00 | Gulopine | .update() should really behave in the same way as __setitem__() |
| 23:01 | Gulopine | whichever way that is, i would think they should be the same. otherwise, it could get confusing really quickly |
| 23:05 | jdunck_ | Gulopine: yeah, i suppose so.. and __setitem__ does have the side-effect of making accessed == True |
| 23:05 | jdunck_ | i'd argue that's a bug, but it's a separate bug. |
| 23:05 | jdunck_ | thanks :) |
| 23:15 | Gulopine | yeah, i think i would agree that __setitem__ (and __delitem__ for that matter) should only set modified, but yeah, that's a separate issue :) |
| 23:18 | jdunck_ | |
| 23:18 | jdunck_ | fwiw |
| 23:19 | jdunck_ | i fear it'll be held up since it doesn't implement *all* dict methods, but it's enough for me ;-) |
| 23:25 | Gulopine | it's a start, anyway |
| 23:28 | Gulopine | hrm, you missed bonus points for **kwargs in update() |
| 23:28 | Gulopine | hehe |
| 23:37 | jdunck_ | Gulopine: d'oh-- figures, that's the part i didn't write ;-) |
| 23:38 | Gulopine | ah, heheh |
| 23:43 | jdunck_ | Gulopine: fixed |
| 23:43 | jdunck_ | lame variable names, but matching py docs |
| 23:46 | Gulopine | wow, seriously? :( |
| 23:46 | Gulopine | cause yeah, those pretty much suck |
| 23:51 | jdunck_ | frankly, the dict docstrings are generally confusing to me :) |
| 23:52 | jdunck_ | anyway, time to go home, and then some |
Page 2 of 2
← Previous
(141 total)