Newbie: Print question
Tommy Grav
tgrav at mac.com
Wed Mar 22 14:35:29 EST 2006
Thanks.
That works. Like I said I am a newbie :)
Cheers
Tommy
On Mar 22, 2006, at 1:17 PM, Fredrik Lundh wrote:
> Tommy Grav wrote:
>
>> for testobs in obslist:
>> print testobs.printmpc()
>
> print.
>
>> def printmpc(self):
>> if self.mag!="":
>> print "%14s %12.5f %5.2f %6.2f %8.3f %3i"
>
> and print.
>
>> I don't understand where these None's are coming from.
>
> for each testobs, you're printing stuff inside the printmpc method,
> and you're
> then printing the return value from the method. removing the extra
> print
>
> for testobs in obslist:
> testobs.printmpc()
>
> should fix this.
>
> </F>
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
Cheers
Tommy
tgrav at mac.com
http://homepage.mac.com/tgrav/
"Any intelligent fool can make things bigger,
more complex, and more violent. It takes a
touch of genius -- and a lot of courage --
to move in the opposite direction"
-- Albert Einstein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060322/feec84dc/attachment.html>
More information about the Python-list
mailing list