Hi there,
i get the following error when i try to recieve from a socket
Traceback (most recent call last):
File "D:\backup\pythonstuff\projects\hyperd\webserver.py", line 51, in ?
server.start() # '()' again
File "D:\backup\pythonstuff\projects\hyperd\webserver.py", line 2
Syver Enstad wrote:
>"Matthew Sherborne" <[EMAIL PROTECTED]> writes:
>
>>So I now realize that it is not "Integer Division", it is "Division
>>with the
>>result rounded down".
>>
>
>I think you want this instead:
>
>round(5/2)
>
>By the way whats wrong with 5/2 = 2 ?
>You have five tennisballs, s
Originally python evaluated
5 / 2 = 2
5.0 / 2.0 = 2.5
It's hard to write and read generic code with such semantics.
It's easier when
a // b always truncates and
a / b never truncates
Kari
-Original Message-
From: [EMAIL PROTECTED]
By the way whats wrong with 5/2 = 2 ?
__
Syver Enstad wrote:
> By the way whats wrong with 5/2 = 2 ?
> You have five tennisballs, split them on two persons. Surely they can't
> have more than two tennisballs each.
Nothing's "wrong" with it. Indeed, a new operator ( // ) was introduced to
explicitly support that very case. The point
Try that with 2 kids with 5 lollies!
---Original Message---
From: Syver Enstad
Date: Tuesday, April
30, 2002 22:48:20
To: Matthew Sherborne
Cc: [EMAIL PROTECTED]
Subject: Re: New //
operator
"Matth
[EMAIL PROTECTED] writes:
> I'm into Visual Basic for Applications mainly with Excel and gradually
> found limitations
>
> with both for my purposes. Heard about Python and put in some days of
> work on it. I've
>
> only ever used Windows so had some problems with the tutorials
> referring to
"Matthew Sherborne" <[EMAIL PROTECTED]> writes:
> So I now realize that it is not "Integer Division", it is "Division
> with the
> result rounded down".
I think you want this instead:
round(5/2)
By the way whats wrong with 5/2 = 2 ?
You have five tennisballs, split them on two persons. Surely