[Tutor] Fwd: pickle module error in source code

2015-01-01 Thread Vedhi Shreya Marwaha
Hi! My name is Shreya Marwaha. I’m class 12th student in India. I’m using 2.7.5 python version [MSC v.1500 64 bit (AMD64)] on win32 as instructed by CBSE (central board of secondary education). I’ve been having problem in using pickle module. It keeps on showing error in the source code. I’ve

Re: [Tutor] Tutor Digest, Vol 130, Issue 47

2015-01-01 Thread Tammy Miller
This is regarding the Python drop-down list response. I would like to create a GUI that has a drop down list containing the data and displayed based on the stats of the list contents. I am interested in using Tkinter, wxPython or PyGTK. My data is coming from a csv file. I am using Python 2.79

Re: [Tutor] pickle module error in source code

2015-01-01 Thread Peter Otten
Vedhi Shreya Marwaha wrote: Hi! My name is Shreya Marwaha. I’m class 12th student in India. Welcome! I’m using 2.7.5 python version [MSC v.1500 64 bit (AMD64)] on win32 as instructed by CBSE (central board of secondary education). I’ve been having problem in using pickle module. It keeps

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

2015-01-01 Thread Alex Kleider
On 2014-12-31 16:18, Steven D'Aprano wrote: py grid[1][1] = 99 # Adjust a single cell. py print(grid) [[0, 99, 0, 0, 0], [0, 99, 0, 0, 0], [0, 99, 0, 0, 0], [0, 99, 0, 0, 0]] while you expected: [[0, 0, 0, 0, 0], [0, 99, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] Am I right? Yes,

[Tutor] Drop-down list [was: Re: Tutor Digest, Vol 130, Issue 47]

2015-01-01 Thread Alan Gauld
On 01/01/15 17:31, Tammy Miller wrote: This is regarding the Python drop-down list response. Thanks, but please do not send the entire digest contents. Delete what is not relevant, then you wouldn't need to tell us, and those who pay by the byte would not have such big bills. Also change the

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

2015-01-01 Thread Dave Angel
On 01/01/2015 11:48 PM, WolfRage wrote: Final Code Using 2d List instead of Doubly Linked List. Please don't top-post. Instead, post your comments inline with the parts of the previous message to which you're responding. Is there a reason you doublespaced the whole thing? And why did

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

2015-01-01 Thread WolfRage
Final Code Using 2d List instead of Doubly Linked List. class GameTile(): def __init__(self, id, **kwargs): # id is (X,Y) self.id = id class GameGrid(): def __init__(self, **kwargs): self.cols = 7 self.rows = 8 # grid is 2d array as y, x ie [y][x]. self.grid = [[None] * self.rows for

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

2015-01-01 Thread Steven D'Aprano
On Fri, Jan 02, 2015 at 12:28:38AM -0500, Dave Angel wrote: On 01/01/2015 11:48 PM, WolfRage wrote: Final Code Using 2d List instead of Doubly Linked List. [...] Is there a reason you doublespaced the whole thing? And why did you retype it instead of just copy/pasting it? And why lose the

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

2015-01-01 Thread Alan Gauld
On 02/01/15 01:35, Alan Gauld wrote: Repeats replicates the reference to the object but does not create a new object. reference = original # both refer to same object reference = original - True Oops, typo, should be: reference == original - True reference is original - True -- Alan G

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

2015-01-01 Thread Steven D'Aprano
Fixing the mangled formatting, as best as I am able (and can be bothered). On Thu, Jan 01, 2015 at 11:48:18PM -0500, WolfRage wrote: class GameTile(): def __init__(self, id, **kwargs): # id is (X,Y) self.id = id What is the purpose of the **kwargs? It doesn't get used, it

Re: [Tutor] Fwd: pickle module error in source code

2015-01-01 Thread Alan Gauld
On 01/01/15 14:06, Vedhi Shreya Marwaha wrote: Hi! My name is Shreya Marwaha. I’m class 12th student in India. I’m using 2.7.5 python version [MSC v.1500 64 bit (AMD64)] on win32 as instructed by CBSE (central board of secondary education). I’ve been having problem in using pickle module. OK,

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

2015-01-01 Thread Alan Gauld
On 02/01/15 01:03, Alex Kleider wrote: I don't think I understand the distinction between 'copies' and 'repeats'. copy creates a new object with the same attributes as the original original = [1,2,3] copy = original[:] # slicing creates a copy copy == original - True copy is original -