[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

printing to stdout

On Sun, 19 Aug 2018 10:11:08 -0400
Joel Goldstick <joel.goldstick at gmail.com> wrote:

> > Well, apparently there were quite a lot of things that makes the
> > code more readable I'd say. And even better. But it was indeed not
> > very unPythony. OTOH, I'm not a programmer, otherwise I would have
> > written this in C ;-)
> This strikes me as an odd conclusion.  Raspberry Pi places a strong
> emphasis on python.  It certainly doesn't execute as fast as C can,
> but it provides a conceptually higher level programming model.  There
> is extremely good community support for python with Pi (a huge plus),
> and the code is much more understandable.  It is faster to write code
> with python, you can come back to it and understand it more readily at
> some later time, as can others.  And it runs 'fast enough' .  So, no,
> I don't think if you were a 'programmer' you would have used C to do
> this project.  But others may be of a different persuation.

You've got absolutely a point that Python seems to be largely supported
for Rpi. But I'll tell you something else: I just started to use a
Rpi ;-) I agree that python code is much more understandable than C.
> You seemed to have snipped your question about zip function.  It takes
> iterables (things like lists, tuples, dictionaries) as arguments and
> pairs them together to form tuples.  Look it up.  Very useful.  As and
> example, if you have list1 = (1,2,3), and list2 = (4,5,6,7) and zip
> them you will get ((1,4), (2,5),(3,6)).  (It stops when the shortest
> iterable is exhausted)
> Your allusion to pointers is misguided.  Python is not like C or
> assembler.  You don't, and don't need to know where objects are
> stored.  Names are assigned to reference data objects

I'll have another look at it, I was just searching for a clear
explanation, but the page I found was not clear enough for me. I'll
have to take some time for it...

Richard Lucassen