Re: [Tutor] design advice for function

2005-12-19 Thread Brian van den Broek
Danny Yoo said unto the world upon 2005-12-18 15:19: >> > This is caused by the line: print adder(). Obviously >> > if adder() doesn't receive any arguments, it can't >> > build the lists resulting in an IndexError. >> >>Right. > > > Hello! > > Just wanted to clarify the situation: argsList end

Re: [Tutor] RegEx query

2005-12-19 Thread Liam Clarke
Hi Kent, I apologise for the not overly helpful initial post. I had six possible uris to deal with - /thread/28742/ /thread/28742/?s=1291819247219837219837129 /thread/28742/5/ /thread/28742/5/?s=1291819247219837219837129 /thread/28742/?goto=lastpost /thread/28742/?s=1291819247219837219837129&got

Re: [Tutor] Accessing next and previous items during iteration

2005-12-19 Thread Ed Singleton
On 18/12/05, Kent Johnson <[EMAIL PROTECTED]> wrote: > Ed Singleton wrote: > > Is it possible to access the next and previous items during an iteration? > > This just came up on c.l.python. Bengt Richter has a nice generator-based > solution. > http://groups.google.com/group/comp.lang.python/brows

Re: [Tutor] RegEx query

2005-12-19 Thread Kent Johnson
Liam Clarke wrote: > Hi Kent, > > I apologise for the not overly helpful initial post. > > I had six possible uris to deal with - > > /thread/28742/ > /thread/28742/?s=1291819247219837219837129 > /thread/28742/5/ > /thread/28742/5/?s=1291819247219837219837129 > /thread/28742/?goto=lastpost > /th

[Tutor] List-question

2005-12-19 Thread Øyvind
I have one function that finds some values. Then I want that function to find new values based on the values it found first. However, by just looping, it starts on an eternal job. As illustrated in: >>> list = [1,2,3] >>> list2 = list >>> list2 [1, 2, 3] >>> for i in list: ... print i ...

Re: [Tutor] List-question

2005-12-19 Thread Ed Singleton
On 19/12/05, Øyvind <[EMAIL PROTECTED]> wrote: > I have one function that finds some values. Then I want that function to > find new values based on the values it found first. However, by just > looping, it starts on an eternal job. > > As illustrated in: > >>> list = [1,2,3] > >>> list2 = list > >

Re: [Tutor] List-question

2005-12-19 Thread Ed Singleton
On 19/12/05, Ed Singleton <[EMAIL PROTECTED]> wrote: > On 19/12/05, Øyvind <[EMAIL PROTECTED]> wrote: > > I have one function that finds some values. Then I want that function to > > find new values based on the values it found first. However, by just > > looping, it starts on an eternal job. > > >

Re: [Tutor] Name tables questions

2005-12-19 Thread Kent Johnson
Bernard Lebel wrote: > Hello, > > I have a few theoric questions regarding name tables. I wish to better > understand a few things about this aspect of Python, in particular how > module names and the import statements fit into the picture of name > tables. > > - First of all, I understand each s

Re: [Tutor] List-question

2005-12-19 Thread Terry Carroll
On Mon, 19 Dec 2005, Ed Singleton wrote: > On 19/12/05, Ed Singleton <[EMAIL PROTECTED]> wrote: > > > > list2 = list.copy() > > > > Slices create a copy, so a shortcut is: > > > > list2 = list[:] > > Sorry, you need to: > > from copy import copy > > before you can use copy. It should also be,

Re: [Tutor] bnf

2005-12-19 Thread Hugo González Monteverde
>>> mystring = 'laLA' >>> mystring.upper() 'LALA' >>> mystring.lower() 'lala' ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] question !

2005-12-19 Thread Krava Magare
 How can I remove and add record ( dictionary type) to a file. This is the program that I'm working on: the program should create a text file, print the contents of the text file, read the file after it's been created, add a record and print the contents of the file, remove a record(s) from the

[Tutor] float question

2005-12-19 Thread linda.s
what does 2 mean in %2.4f ? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] synchronized enumerate

2005-12-19 Thread Chris or Leslie Smith
Kent wrote: | Take a look at this thread on c.l.py for some discussion and | possibilities. The part you | are interested in starts around message 14. | http://groups.google.com/group/comp.lang.python/browse_frm/thread/ab1658dca4023e2b?hl=en&; | After looking at that I found something on python-d