Re: [Tutor] TypeError: not enough arguments for format string

2008-07-02 Thread broek
- Message from [EMAIL PROTECTED] - Date: Wed, 02 Jul 2008 14:32:27 -0400 From: bob gailer <[EMAIL PROTECTED]> [EMAIL PROTECTED] wrote: [snip] In a case like print '%s%s' %42 , 333 ... TypeError: not enough arguments for format string it would be ambiguous whether 3

Re: [Tutor] TypeError: not enough arguments for format string

2008-07-02 Thread bob gailer
[EMAIL PROTECTED] wrote: [snip] In a case like print '%s%s' %42 , 333 ... TypeError: not enough arguments for format string it would be ambiguous whether 333 was intended as a second formatting argument or as a second thing to be printed. Here's where the Language Reference comes in ha

Re: [Tutor] TypeError: not enough arguments for format string

2008-07-02 Thread broek
- Message from [EMAIL PROTECTED] - Date: Wed, 2 Jul 2008 16:49:19 +1200 From: John Fouhy <[EMAIL PROTECTED]> On 02/07/2008, Christopher Spears <[EMAIL PROTECTED]> wrote: File "point.py", line 13, in __str__ point_str = "(%f,%f)" % self.x, self.y TypeError: not enoug

Re: [Tutor] TypeError: not enough arguments for format string

2008-07-01 Thread John Fouhy
On 02/07/2008, Christopher Spears <[EMAIL PROTECTED]> wrote: > File "point.py", line 13, in __str__ > point_str = "(%f,%f)" % self.x, self.y > TypeError: not enough arguments for format string > > Does anyone know what is wrong? I'm sure it is something obvious, but I > can't see it. Hi

Re: [Tutor] TypeError: not enough arguments for format string

2008-07-01 Thread Eric Abrahamsen
On Jul 2, 2008, at 12:36 PM, Christopher Spears wrote: I'm working on problem 13-5 in Core Python Programming (2nd Edition). I am supposed to create point class. Here is what I have so far: #!/usr/bin/python class Point(object): def __init__(self, x=0.0,y=0.0): self.x = float(

[Tutor] TypeError: not enough arguments for format string

2008-07-01 Thread Christopher Spears
I'm working on problem 13-5 in Core Python Programming (2nd Edition). I am supposed to create point class. Here is what I have so far: #!/usr/bin/python class Point(object): def __init__(self, x=0.0,y=0.0): self.x = float(x) self.y = float(y) def __repr__(self)