the tested variable was really a string containing "None" instead of
simply None. this is the first time i ran into this error message
confusion. :)
thanks for the help!
On Feb 3, 6:29 pm, Michael Bentley <[EMAIL PROTECTED]> wrote:
> On Feb 3, 2007, at 7:47 AM, karoly.kiripolszky wrote:
>
> > in
On Feb 3, 2007, at 7:47 AM, karoly.kiripolszky wrote:
> in my server i use the following piece of code:
>
> ims = self.headers["if-modified-since"]
> if ims != None:
> t = int(ims)
>
> and i'm always getting the following error:
>
> t = int(ims)
> Value
"karoly.kiripolszky" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> in my server i use the following piece of code:
>
> ims = self.headers["if-modified-since"]
> if ims != None:
> t = int(ims)
>
> and i'm always getting the following error:
>
>
karoly.kiripolszky wrote:
> in my server i use the following piece of code:
>
> ims = self.headers["if-modified-since"]
> if ims != None:
> t = int(ims)
>
> and i'm always getting the following error:
>
> t = int(ims)
> ValueError: invalid literal for
> "karoly" == karoly kiripolszky writes:
karoly> in my server i use the following piece of code:
karoly> ims = self.headers["if-modified-since"]
karoly> if ims != None:
karoly> t = int(ims)
karoly> and i'm always getting the followi
forgot to mention my interpreter version: 2.4.4
--
http://mail.python.org/mailman/listinfo/python-list
in my server i use the following piece of code:
ims = self.headers["if-modified-since"]
if ims != None:
t = int(ims)
and i'm always getting the following error:
t = int(ims)
ValueError: invalid literal for int(): None
i wanna know what the hell is goi
in my server i use the following piece of code:
ims = self.headers["if-modified-since"]
if ims != None:
t = int(ims)
and i'm always getting the following error:
t = int(ims)
ValueError: invalid literal for int(): None
i wanna know what the hell is goi
>> Have you followed the tutorial through, running and understanding each
>> example, to get the basics of Python covered?
Could be high time to try that again. At first it was way too much, so
I've been doing Dive Into Python and some others. But I will try the
Tutorial again, at least up to clas
"BartlebyScrivener" <[EMAIL PROTECTED]> writes:
> How do you test for a function that returns nothing,
A function returns a single value (which may be a container for other
values). By default, with no 'return' statement, it returns the None
object.
What is it you're trying to do?
> and why doe
I think I was trying for something like this, where the intervening for
iterates over a function that may or may not produce nothing:
x = None
for x in []:
print x
if x is None:
print "x is still none because nothing happened"
Thanks,
rick
--
http://m
BartlebyScrivener wrote:
> How do you test for a function that returns nothing, and why doesn't
> this work? Shouldn't X have to be either None or not?
>
x = None
for x in []:
> ... if x is None:
> ... print "X is None"
> ... else:
> ... print "X is not None"
> ..
How do you test for a function that returns nothing, and why doesn't
this work? Shouldn't X have to be either None or not?
>>>x = None
>>> for x in []:
... if x is None:
... print "X is None"
... else:
... print "X is not None"
...
Thanks,
rick
--
h
13 matches
Mail list logo