Re: [Tutor] python varying mulitple inheritance

2012-06-17 Thread Steven D'Aprano
ke...@kendy.org wrote: Hello I'm new to classes. And I hope the my question isn't too big. I have electronic test equipment, but thought that a boat example would be easier. Can you help me untangle my class design? My problem is basically multiple inheritance, but I want to be flexible for how

[Tutor] python varying mulitple inheritance

2012-06-17 Thread kendy
Hello I'm new to classes. And I hope the my question isn't too big. I have electronic test equipment, but thought that a boat example would be easier. Can you help me untangle my class design? My problem is basically multiple inheritance, but I want to be flexible for how many will inherit. I'll

Re: [Tutor] Dictionary

2012-06-17 Thread James Reynolds
Does this language have grammar independent of english? If no, just use .split() on the string and loop through that. If yes, well, its much more complicated On Jun 17, 2012 2:27 PM, "Selby Rowley-Cannon" wrote: > Version: 2.7 > OS: Ubuntu 12.04 LTS > > I am writing a small translation app for

[Tutor] Dictionary

2012-06-17 Thread Selby Rowley-Cannon
Version: 2.7 OS: Ubuntu 12.04 LTS I am writing a small translation app for Rydish (A language that exists in the same way Klingon does, invented by my company for a[n] RPG). Here is my current method of translation: Edictionary = {'English keys':'Rydish values'} TextEng = raw_input('Please ent

Re: [Tutor] Dictionaries

2012-06-17 Thread Alan Gauld
On 17/06/12 15:14, Selby Rowley-Cannon wrote: I am having a problem with a small application I am writing. I have to have the user input the key, then have the program output the value associated with it. A way to inform the user that the key they entered is not in the dictionary or somefing

Re: [Tutor] Dictionaries

2012-06-17 Thread Martin A. Brown
Greetings, : I am having a problem with a small application I am writing. I : have to have the user input the key, then have the program output : the value associated with it. A way to inform the user that the : key they entered is not in the dictionary or somefing would be : nice also.

Re: [Tutor] Dictionaries

2012-06-17 Thread Emile van Sebille
On 6/17/2012 7:14 AM Selby Rowley-Cannon said... Hello, I am having a problem with a small application I am writing. I have to have the user input the key, then have the program output the value associated with it. A way to inform the user that the key they entered is not in the dictionary or som

[Tutor] Dictionaries

2012-06-17 Thread Selby Rowley-Cannon
Hello,             I am having a problem with a small application I am writing. I have to have the user input the key, then have the program output the value associated with it. A way to inform the user that the key they entered is not in the dictionary or somefing would be nice also. Fank you

Re: [Tutor] Simple Python Address Book (Advice welcome!)

2012-06-17 Thread Wayne Werner
On Sun, 17 Jun 2012, Alan Gauld wrote: On 17/06/12 02:45, mariocatch wrote: after each row? #it's causing multiple line separations when writing back out to file (because each # time we finish reading, it ends with a trailing newline). f.write("{0}{1}{2}\n".format(k

Re: [Tutor] Simple Python Address Book (Advice welcome!)

2012-06-17 Thread Alan Gauld
On 17/06/12 02:45, mariocatch wrote: I'm essentially asking if someone wouldn't mind taking a look at what I have so far, and giving some advice on some of my weak areas, Welcome, I've inserted a few comments below. In general it's OK although personally I'd probably put the email validation