Re: Strange varargs issue

2008-01-04 Thread Mike
You know, every once in a while, self really bites me. (I program in Java too much) Thanks for everyone who replied quickly. Mike wrote: >> [ a bunch of crap because I forgot self, nevermind sorry ] -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange varargs issue

2008-01-04 Thread Fredrik Lundh
Mike wrote: >__f.func(a) > TypeError: func() takes exactly 1 argument (2 given) > > How can this possibly be? The "caller" print statement obviously > shows "a" is singular. __f.func(a) is a method call, and methods always get the object itself as an extra initial argument. to fix this, a

Re: Strange varargs issue

2008-01-04 Thread Chris
On Jan 4, 3:45 pm, Mike <[EMAIL PROTECTED]> wrote: > I'm not sure if this is a bug or if I'm just not understanding > something correctly. I'm running the following (broken.py) on > ActivePython 2.5.1.1, based on Python 2.5.1 (r251:54863 5/1/2007) as > "python broken.py foo" (on Windows, of course

Re: Strange varargs issue

2008-01-04 Thread Diez B. Roggisch
Mike schrieb: > I'm not sure if this is a bug or if I'm just not understanding > something correctly. I'm running the following (broken.py) on > ActivePython 2.5.1.1, based on Python 2.5.1 (r251:54863 5/1/2007) as > "python broken.py foo" (on Windows, of course): > > > #!/bin/env python > > imp

Strange varargs issue

2008-01-04 Thread Mike
I'm not sure if this is a bug or if I'm just not understanding something correctly. I'm running the following (broken.py) on ActivePython 2.5.1.1, based on Python 2.5.1 (r251:54863 5/1/2007) as "python broken.py foo" (on Windows, of course): #!/bin/env python import sys class foobar(object):