Re: [Tutor] Re: Self referencing within a dictionary

2005-04-02 Thread John Fouhy
Andrei wrote: Liam Clarke wrote on Sat, 2 Apr 2005 22:12:49 +1200: I know that as above doesn't work, but was just wondering if it's possible, and if it's a Bad Thing? Max has already shown it's possible. Whether it's a Bad Thing... I don't see why it would be. But I also can't imagine right now an

Re: [Tutor] What is the best book to start? - Many Thanks!

2005-04-02 Thread Hoffmann
Dear All, I would like to thank all of you that kindly, answered my question regarding good Python books to start. As I told you guys before, I am a newbie and I decided to start studying Python, that seems to be a nice programming language. That was my first post in this group, and I appreciated

Re: [Tutor] How to get user input as regex

2005-04-02 Thread Dick Moores
Pierre Barbier de Reuille wrote at 07:22 4/2/2005: You should do something much simpler ^_^ : import re s = raw_input("regex : ") digs = re.compile(s) [...] Aha! Thanks! Dick ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinf

[Tutor] Re: Self referencing within a dictionary

2005-04-02 Thread Andrei
Liam Clarke wrote on Sat, 2 Apr 2005 22:12:49 +1200: > I know that as above doesn't work, but was just wondering if it's > possible, and if it's a > Bad Thing? Max has already shown it's possible. Whether it's a Bad Thing... I don't see why it would be. But I also can't imagine right now any real

Re: [Tutor] How to get user input as regex

2005-04-02 Thread Pierre Barbier de Reuille
You should do something much simpler ^_^ : import re s = raw_input("regex : ") digs = re.compile(s) [...] That should work :) pierre Dick Moores a écrit : I'm just beginning to learn regex, and am wondering how to get user input that can be used as a regex. Of course my attempt below doesn't work

[Tutor] How to get user input as regex

2005-04-02 Thread Dick Moores
I'm just beginning to learn regex, and am wondering how to get user input that can be used as a regex. Of course my attempt below doesn't work, but how should I modify it? I'm practicing with phone.txt, which is 513 lines, each line having a name and phone number, and some other details like an

Re: [Tutor] Self referencing within a dictionary

2005-04-02 Thread Max Noel
On Apr 2, 2005, at 12:12, Liam Clarke wrote: Hi, Out of curiosity, is it possible to create a dictionary like this - foo = {'a':1, 'b':2, 'c':foo['a']} I know that as above doesn't work, but was just wondering if it's possible, and if it's a Bad Thing? Regards, Liam Clarke It doesn't work because

[Tutor] Self referencing within a dictionary

2005-04-02 Thread Liam Clarke
Hi, Out of curiosity, is it possible to create a dictionary like this - foo = {'a':1, 'b':2, 'c':foo['a']} I know that as above doesn't work, but was just wondering if it's possible, and if it's a Bad Thing? Regards, Liam Clarke -- 'There is only one basic human right, and that is to do as