Re: [Tutor] custom error classes: how many of them does one need?

2013-07-04 Thread Steven D'Aprano
On 05/07/13 05:40, Albert-Jan Roskam wrote: Hello, I created a custom error class like under [A] below (see http://pastebin.com/JLwyPsRL if you want to see highlighted code). Now I am thinking: is this specific enough? "When creating a module that can raise several distinct errors, a common pr

Re: [Tutor] custom error classes: how many of them does one need?

2013-07-04 Thread Alan Gauld
On 04/07/13 20:40, Albert-Jan Roskam wrote: creating a module that can raise several distinct errors, a common practice is to create a base class for exceptions defined by that module, and subclass that to create specific exception classes for different error conditions" Yes, although not usua

Re: [Tutor] Saving Progress

2013-07-04 Thread Marc Tompkins
On Thu, Jul 4, 2013 at 12:25 AM, Dave Angel wrote: > On 06/27/2013 11:16 AM, Jack Little wrote: > >> Is there a way to save a players progress in a game using python without >> any modules >> >> Jack >> >> > If you organize the game in such a way that a relatively few variables > holds the state,

Re: [Tutor] Saving Progress

2013-07-04 Thread Dave Angel
On 06/27/2013 11:16 AM, Jack Little wrote: Is there a way to save a players progress in a game using python without any modules Jack If you organize the game in such a way that a relatively few variables holds the state, then you can write those variables to a file, and when restarting the