oh my, this server is really slow
I installed wp-cache yesterday so reading should actually be better (not many visitors come around so probably overkill) but writing is really a pain…
oh my, this server is really slow
I installed wp-cache yesterday so reading should actually be better (not many visitors come around so probably overkill) but writing is really a pain…
Written quite a while ago but but still a very good post about how closures in Python work. Basically they are read-only so if you need to mutate a value you need to use a mutable variable like a list or object.
Closures in e.g. Javascript are easier – ah wait, actually I am not quite sure if I actually did change a value the last time I just a closure…
- just checked, it does work as expected (thanks to Firebug, I guess that’s why I like both Javascript and Python, both with a great console
):
>>> a = 1
>>> function b() { alert(a); a = 2}
>>> b() // alerts 1
>>> b() // alerts 2
>>> a
>>> 2
I do quite like to work with closures, working with Ajax callbacks is almost only possible by using them. I did try to use the same technique in cssutils and of course failed miserably until I found the above post and workaround. So all in all better than nothing. I wonder though if it would be very difficult to add “proper” closure support to Python, guess a simple syntax is the most difficult…
Just added recaptcha which is simply available as a WordPress plugin. Guess I should add it to my normal site’s comment form as well (from which I normally spam only though).
I guess I should not even post my score but on the other hand why not?
(via Grig Gheorghiu, and I guess I do about any survey that is available…)
Powered by WordPress