Re: Apache restart after source changes

2013-12-29 Thread diverman
In development environment I suggest to use build-in webserver from wsgiref 
module, see http://docs.python.org/2/library/wsgiref.html#examples

Then it's easy to run webserver in console and kill&start it with Ctrl+C 
keystroke. In production environment, use your prefered webserver like 
apache,nginx etc...

Dne čtvrtek, 26. prosince 2013 7:36:45 UTC+1 Fredrik Bertilsson napsal(a):
> > Also, it's not a python issue, it's an issue with your particular
> 
> > stack. Other stacks do automatic reloading (for example, the web
> 
> > server that Django uses).
> 
> 
> 
> Which web server do you suggest instead of Apache, which doesn't have this 
> problem? (I am not planning to use Django)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Language design

2013-09-10 Thread diverman
No exactly bad, but can suprise

>>> foo=([],)
>>> foo[0] += ['bar']
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'tuple' object does not support item assignment
>>> foo
(['bar'],)



Dne úterý, 10. září 2013 8:09:25 UTC+2 Steven D'Aprano napsal(a):
> Some time ago, Tom Christiansen wrote about the "Seven Deadly Sins of 
> 
> Perl":
> 
> 
> 
> http://www.perl.com/doc/FMTEYEWTK/versus/perl.html
> 
> 
> 
> 
> 
> What design mistakes, traps or gotchas do you think Python has? Gotchas 
> 
> are not necessarily a bad thing, there may be good reasons for it, but 
> 
> they're surprising.
> 
> 
> 
> To get started, here are a couple of mine:
> 
> 
> 
> 
> 
> - Python is so dynamic, that there is hardly anything at all that can be 
> 
> optimized at compile time.
> 
> 
> 
> - The behaviour of mutable default variables is a gotcha.
> 
> 
> 
> - Operators that call dunder methods like __add__ don't use the same 
> 
> method resolution rules as regular methods, they bypass the instance and 
> 
> go straight to the type, at least for new-style classes.
> 
> 
> 
> 
> 
> 
> 
> -- 
> 
> Steven

-- 
https://mail.python.org/mailman/listinfo/python-list