Op woensdag 6 maart 2013 16:46:08 UTC+1 schreef Jeroen Demeyer het volgende: > > On 2013-03-06 16:23, Timo Kluck wrote: > > you can > > suddenly mix all that piping with with dictionaries, or any > > other things in which python is superior to bash. > This would probably be the best argument. > I agree.
> > Think readability > So you think that > (echo 'print(factor(x^2 - 1))' | xargs[sage['-c']])() > is more readable than > echo 'print(factor(x^2 - 1))' | xargs sage -c > > No, I don't, of course :-) I'm saying python in general is engineered for readability, bash isn't. Considering this single line, bash is more readable, at the expense of ... > > That'll help against bugs of the type "foo does not > > work when I have a space in my path". > Quoting in bash can also prevent these problems. > ... But it's hard to get right, and if you get it wrong it's very easy to get a security vulnerability. In python, you would get a syntax error. > > Suppose that your first checkout fails (the branch exists, or you are in > > the middle of a merge, or whatever). Now all your tempary changes are in > > you master branch. I should have checked exit codes, but who does? With > > plumbum, the failing checkout will give you an exception right away. > With "set -e" in bash, this also holds for shell scripts. > I didn't know about that, it is very useful indeed. Timo -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
