[Chicago] Just sharing with everyone in the group.

Japhy Bartlett japhy at pearachute.com
Tue Mar 3 18:18:46 CET 2015


Spaces and tabs both work, but if you mix them it creates a terrible mess.
So by convention, we all agreed to use spaces for our collective sanity.


I wanted to make another very slight criticism of your code; often when
people start learning Python they get to the part about classes and
inheritance and start using classes for everything.  So it's good to see
that you've figured out how that works, but it's not really helpful to your
program.  I can see ways that all could be much simpler!


Well done though, and thank you for posting actual Python code :)

- Japhy

On Tue, Mar 3, 2015 at 10:57 AM, Lewit, Douglas <d-lewit at neiu.edu> wrote:

> I was thinking about that last night!  ;-)   So then I assume that "None"
> is equivalent to Java's null, but according to what you wrote above "None"
> evaluates to False in a truth test?  I didn't know that!  Very cool.
>
> What's the difference between spaces and tabs?  My favorite text editors
> for program writing are the Unix/Linux/Mac editors *Vim* and *Emacs*.
> Both of those have builtin tab functions.  Emacs is especially good with
> deciding where to place tab indentations.  Vim is okay too, but Emacs is
> really, really good.
>
> I repeated the same program in Python 3.  Some interesting changes!  10/3
> gives you 3 in Python 3.  10/3 gives you 3.333333333333 in Python 3.  To
> get 3 you need 10//3.  We all know about the print function.  And some
> other changes too.  Do you think the language benefitted from these
> backward INcompatible changes?  I think the Python community is still
> wondering about that.
>
> On Mon, Mar 2, 2015 at 4:40 PM, Brian Ray <brianhray at gmail.com> wrote:
>
>>
>> i probably meant ""while L.next.next", but you get what I mean, I hope.
>>
>> On Mon, Mar 2, 2015 at 4:38 PM, Brian Ray <brianhray at gmail.com> wrote:
>>
>>> Just some small formatting issues. Try to use spaces (4) not tabs.
>>>
>>> and "while not L.next.next" is preferred over "while L.next.next != None"
>>>
>>>
>>>
>>> On Fri, Feb 27, 2015 at 5:57 PM, Lewit, Douglas <d-lewit at neiu.edu>
>>> wrote:
>>>
>>>> Hey guys--and ladies too!  It's been a while since I shared any Python
>>>> work with this forum, so I figured hey, why not?
>>>>
>>>> This is my first effort at implementing a *linked list* in Python.
>>>> Fun stuff!  I'm taking a Java data structures course right now at
>>>> Northeastern.  Java is a nice language, and according to the online
>>>> statistics Java is the king of all programming languages, at least for
>>>> right now.  (The computer world is extremely fickle, so we really don't
>>>> know which programming language will be "the king" in 5 or 10 years.)
>>>>
>>>> Anyhow, I purchased this book on Python data structures by Magnus Lie
>>>> Hetland.  Great book and so helpful!  It has even helped me better
>>>> understand the concepts in my Java course.  (The languages are
>>>> different--sure thing--but I think the core concepts are almost exactly the
>>>> same.)  The name of the book is PYTHON ALGORITHMS.  Magnus Lie Hetland is
>>>> the author.  It's really good.
>>>>
>>>> So I'm attaching my code.  Please be kind in your criticisms!  I know
>>>> it's not the Mona Lisa of computer programming, but hey, if I'm lucky my
>>>> mother will tape a printed copy of the program to the refrigerator door and
>>>> leave it there with a gold star on it for the next few days!!!  ;-)   Is
>>>> that really asking for too much?!  LOL!!!
>>>>
>>>> Best,
>>>>
>>>> Douglas.
>>>>
>>>> _______________________________________________
>>>> Chicago mailing list
>>>> Chicago at python.org
>>>> https://mail.python.org/mailman/listinfo/chicago
>>>>
>>>>
>>>
>>>
>>> --
>>> Brian Ray
>>> @brianray
>>> (773) 669-7717
>>>
>>
>>
>>
>> --
>> Brian Ray
>> @brianray
>> (773) 669-7717
>>
>> _______________________________________________
>> Chicago mailing list
>> Chicago at python.org
>> https://mail.python.org/mailman/listinfo/chicago
>>
>>
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> https://mail.python.org/mailman/listinfo/chicago
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20150303/e31ef8c4/attachment.html>


More information about the Chicago mailing list