syntax difference
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Wed Jun 20 08:03:17 EDT 2018
On Wed, 20 Jun 2018 03:43:17 -0700, bart4858 wrote:
> I'm saying
> that Python which is always touted as a 'simple' language suitable for
> beginners, is missing a surprising number of basics.
You call them "basics". Must of us call most of them "unnecessary bloat".
What we call "the basics", like the object execution module which you
hate so much, *you* call "unnecessary bloat".
THAT is the blub paradox, which you have completely failed to grok.
I consider a seamless and easy way to open, incrementally read line by
line, and close, a Unicode text file like this:
with open(somefile, "r", encoding='spam', errors='eggs') as f:
# for some value of spam and eggs :-)
for line in f:
process(line)
to be "the basics". If your language doesn't do that, to me it is too
primitive to use. You, on the other hand, probably consider the idea of
context managers and iterators and Unicode to be unnecessary bloat, and
think that any language which doesn't have a 1970-style Pascal read()/
readln() function is missing "the basics".
--
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson
More information about the Python-list
mailing list