[Tutor] (no subject)

2007-03-12 Thread isaack harms
___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] File locking

2007-03-12 Thread Smith, Jeff
I'm always disappointed when I find something that Python doesn't handle in a platform independent way. It seems to me that file locking is in that boat. 1. I don't see a way to atomically open a file for writing if and only if it doesn't exist without resorting to os.open and specialized platfo

Re: [Tutor] default parameters in classes

2007-03-12 Thread Terry Carroll
On Mon, 12 Mar 2007, J Greg wrote: > Perhaps I don't understand. In the example below, the > first instance correctly creates a fresh dictionary. > But the second instance seems to inherit the now dirty > dictionary from the first instance. > > What am I missing? This is a very common Python "g

Re: [Tutor] default parameters in classes

2007-03-12 Thread Kent Johnson
J Greg wrote: > I want my object to create a fresh dictionary if its > not passed one. > > Perhaps I don't understand. In the example below, the > first instance correctly creates a fresh dictionary. > But the second instance seems to inherit the now dirty > dictionary from the first instance. >

[Tutor] default parameters in classes

2007-03-12 Thread J Greg
I want my object to create a fresh dictionary if its not passed one. Perhaps I don't understand. In the example below, the first instance correctly creates a fresh dictionary. But the second instance seems to inherit the now dirty dictionary from the first instance. What am I missing? class n

Re: [Tutor] String-manipulation question

2007-03-12 Thread Alan Gauld
"John Fouhy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 12/03/07, Alan Gilfoy <[EMAIL PROTECTED]> wrote: > >> My question here boils down to, "Is there a way to remove certain >> characters from a string?" > In this case, it looks like you're after "string slicing". The > t