Re: [Tutor] Why are arguments sometimes on the left side?

2010-09-20 Thread Emile van Sebille
On 9/20/2010 9:54 AM Joel Goldstick said... That's pretty creative I think, but not sure its quite on the mark for beginners? ;) With this one fitting into context so easily, it seemed appropriate. Emile ___ Tutor maillist - Tutor@python.org To un

Re: [Tutor] Why are arguments sometimes on the left side?

2010-09-20 Thread Joel Goldstick
On Mon, Sep 20, 2010 at 12:04 PM, Emile van Sebille wrote: > On 9/20/2010 7:16 AM Michael Scharf said... > > Why is it >>list0.extend(list1) >> and not >>extend(list 0, list1) >> or >>stri0 = stri0.strip() >> and not >>stri0 = strip(stri0) >> Why have arguments on the left side a

Re: [Tutor] Why are arguments sometimes on the left side?

2010-09-20 Thread Emile van Sebille
On 9/20/2010 7:16 AM Michael Scharf said... Why is it list0.extend(list1) and not extend(list 0, list1) or stri0 = stri0.strip() and not stri0 = strip(stri0) Why have arguments on the left side at all, when usually the dot notation left to right implies a hierarchical relation: fi

Re: [Tutor] Can't process all my files (need to close?)

2010-09-20 Thread Tim Golden
On 20/09/2010 16:19, aenea...@priest.com wrote: My Python script needs to process 45,000 files, but it seems to blow up after about 10,000. Note that I'm outputting bazillions of rows to a csv, so that may be part of the issue. Here's the error I get (I'm running it through IDLE on Windows 7):

[Tutor] Can't process all my files (need to close?)

2010-09-20 Thread aeneas24
My Python script needs to process 45,000 files, but it seems to blow up after about 10,000. Note that I'm outputting bazillions of rows to a csv, so that may be part of the issue. Here's the error I get (I'm running it through IDLE on Windows 7): Microsoft Visual C++ Runtime Library Runtime Er

Re: [Tutor] Why are arguments sometimes on the left side?

2010-09-20 Thread Michael Scharf
Okay, we now have a dog named Fluffy, which is just one instance of > our dog class. With the way you would want to do things, I would have > to say > bark(f) > But what is bark? Where is it defined? You can see it is in the dog > class, but Python cannot; you passed a dog instance to bark(), but >

Re: [Tutor] Why are arguments sometimes on the left side?

2010-09-20 Thread Alex Hall
On 9/20/10, Michael Scharf wrote: > Hi, > > > Why is it > > > >list0.extend(list1) > > > > and not > > >extend(list 0, list1) > > > > or > > >stri0 = stri0.strip() > > > and not > > >stri0 = strip(stri0) This is because you are calling methods on objects, in this case strings and

Re: [Tutor] Why are arguments sometimes on the left side?

2010-09-20 Thread Joel Goldstick
On Mon, Sep 20, 2010 at 10:16 AM, Michael Scharf wrote: > > Hi, > > > Why is it > > > >list0.extend(list1) > because extend is a list method > > > and not > > >extend(list 0, list1) > > > > or > > >stri0 = stri0.strip() > > > strip is a string method > and not > > >stri0 = str

[Tutor] Why are arguments sometimes on the left side?

2010-09-20 Thread Michael Scharf
Hi, Why is it list0.extend(list1) and not extend(list 0, list1) or stri0 = stri0.strip() and not stri0 = strip(stri0) Why have arguments on the left side at all, when usually the dot notation left to right implies a hierarchical relation: file.class or class.method