On 11/26/06, tomer filiba <[EMAIL PROTECTED]> wrote:
> i found several places in my code where i use positive infinity
> (posinf) for various things, i.e.,
>
>
> i like the concept, but i hate the "1e1" stuff... why not add
> posint, neginf, and nan to the float type? i find it much more readab
> Um, you do realize that you're not going to be able to fit sys.maxint
> strings into a list, right?
i can multiply by four, thank you. of course i don't expect anyone to read
a string *that* long.
besides, this *particular example* isn't important, it was just meant to
show why someone might wan
tomer filiba schrieb:
> okay, that would suffice. but why isn't it part of stdlib already?
> the pep is three years old... it should either be rejected or accepted.
> meanwhile, there are lots of missing API functions in the floating-point
> implementation...
It's not rejected because people keep
At 07:07 PM 11/26/2006 +0200, tomer filiba wrote:
> > sys.maxint makes more sense there.
>no, it requires *infinity* to accomplish x - y == x; y != 0, for example:
>
>while limit > 0:
> limit -= len(chunk)
Um, you do realize that you're not going to be able to fit sys.maxint
strings into a li
tomer filiba wrote:
> no, it requires *infinity* to accomplish x - y == x; y != 0, for example:
>
> while limit > 0:
> limit -= len(chunk)
>
> with limit = posinf, the above code should be equivalent to "while True".
that's a remarkably stupid way to count bytes. if you want to argue for
> sys.maxint makes more sense there.
no, it requires *infinity* to accomplish x - y == x; y != 0, for example:
while limit > 0:
limit -= len(chunk)
with limit = posinf, the above code should be equivalent to "while True".
> There is already a PEP 754 for float constants
okay, that would suff
On 11/26/06, tomer filiba <[EMAIL PROTECTED]> wrote:
> i found several places in my code where i use positive infinity
> (posinf) for various things, i.e.,
>
> def readline(self, limit = -1):
> if limit < 0:
> limit = 1e1 # posinf
> chars = []
> while lim
i found several places in my code where i use positive infinity
(posinf) for various things, i.e.,
def readline(self, limit = -1):
if limit < 0:
limit = 1e1 # posinf
chars = []
while limit > 0:
ch = self.read(1)
chars.append(ch)