In what way is python 2 more convenient to write? Outside of the rapidly shrinking set of cases where the best approach to a key problem is addressed by a Py 2 only library -- or the case of "I want to deploy on Google App Engine" -- I don't really see how Py 2 is "more convenient".
Because python 3 was not the most stable at the time of distribution of that operating system. Why would I the developer of said operating system release anything but the most stable versions of the language? This would in turn make my operating system at times less stable.
She's ok with the occasional "sudo pip install ..." to get a library, but if my instructions started with "ok, first install Xcode and then install homebrew" the answer would probably be "it's ok I'll just do it by hand"
Its not that difficult.
Arch comes with Python 3 as default.
print(x, end='')
Not quite as nice, but not exactly unusable.Yes, its a function not a statement, so its now print(x).
> which also gets rid of "print x,", which printed something without making a newline, for one thing.
Sure, you have to do: print(x,end=' ')
if you want to space separate things printed on separate code lines on the same output line.
Of course, if the extra keystrokes bother you, its really not much one-time cost to toss together a library that provides a function that gets rid of them, while keeping the rest of the power of the print function:
def p(*args, **kwargs):
kwargs = {'end': ' '}.update(kwargs)
print(*args,**kwargs)
Though if I was going to bother to do that, I'd probably do it with the same separator for multiple items on the same line as for items on different lines: def p(*args, **kwargs):
kwargs = {'sep': ' ', 'end': ' '}.update(kwargs)
print(*args,**kwargs)
or, further leveraging print-is-a-function: import functools
p = functools.partial(print, sep=' ',end=' ')