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

printing to stdout

On Sun, Aug 19, 2018 at 9:56 AM richard lucassen
<mailinglists at lucassen.org> wrote:
> On Sun, 19 Aug 2018 12:02:51 +0300
> Marko Rauhamaa <marko at pacujo.net> wrote:
> > richard lucassen <mailinglists at lucassen.org>:
> > > As I'm new to Python, just this question: are there any unPythony
> > > things in this code?
> >
> > Your code looks neat.
> 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.

> R.

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
> --
> richard lucassen
> http://contact.xaq.nl/
> --
> https://mail.python.org/mailman/listinfo/python-list

Joel Goldstick