[Tutor] Making Doubly Linked List with Less Lines of Code.

Dave Angel davea at davea.name
Fri Jan 2 16:57:02 CET 2015


On 01/02/2015 10:53 AM, WolfRage wrote:
> On 01/02/2015 10:37 AM, Alan Gauld wrote:
>
>>
>> I use Thunderbird for posting too, and nobody has complained yet about
>> my code layout.
>> My account settings are:
>>
>> Composition&Addressing
>> Compose in HTML - OFF
>> Auto quote original then "START REPLY BELOW QUOTE"
>>
>> My Tbird prefs are:
>> Composition->General tab-> Send Options button
>> Text Format set to "Convert to plain text"
>> Plain Text domains tab -> includes python.org and gmane.org
>>
>> And in my Address book I have the python tutor list entry set to
>>
>> Prefers messages formatted as PLAIN TEXT
>>
>> HTH
> Using Alan's settings above I can already see the difference in the
> composition window.
>
> Reposting my code to see if it comes out correctly now. I am still
> applying Steve's suggestions.
>
> import sys
>
>
> class GameTile():
>      def __init__(self, col, row, **kwargs):
>          # id is (X,Y)
>          self.id = str(row) + ',' + str(col)
>          self.col = col
>          self.row = row
>
>      def __str__(self):
>          return '%d, %d' % (self.col, self.row)
>
>

Looks great to me.


-- 
DaveA


More information about the Tutor mailing list