On Sep 13, 5:50 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> Rodney Maxwell wrote:
> > The following are apparently legal Python syntactically:
> >L[1:3, 8:10]
> >L[1, ..., 5:-2]
>
> > But they don't seem to work on lists:
> >>>>
On Sep 13, 5:50 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> Rodney Maxwell wrote:
> > The following are apparently legal Python syntactically:
> >L[1:3, 8:10]
> >L[1, ..., 5:-2]
>
> > But they don't seem to work on lists:
> >>>>
The following are apparently legal Python syntactically:
L[1:3, 8:10]
L[1, ..., 5:-2]
But they don't seem to work on lists:
>>> l = [0,1,2,3]
>>> l[0:2,3]
Traceback (most recent call last):
File "", line 1, in
TypeError: list indices must be integers
>>> l[...]
Traceback (most recent call
In Python 2.4.1:
>>> None = 99
SyntaxError: assignment to None
>>> True = 99
>>> False = 99
>>> True == False
True
---
So why is 'None' special?
--
http://mail.python.org/mailman/listinfo/python-list
> The default file system on MacOSX is case insensitive. As a result
the .exe
> extension is required to disambiguate the generated executable from
the
> Python directory in the source distro.
OK. I got it.
--
http://mail.python.org/mailman/listinfo/python-list
>> executable produced was 'python.exe'. Can someone tell me whether
this
>> is a bug, feature, or UserError?
> I'm not sure. Why don't you grab the binary?
> http://www.python.org/ftp/python/2.4.1/MacPython-OSX-2.4.1-1 .dmg
Because I need to keep multiple versions of Python on this machine, and
I did a source code build of Python 2.4.1 on OS X (10.3.8) and the
executable produced was 'python.exe'. Can someone tell me whether this
is a bug, feature, or UserError?
% ./configure
% make
% ./python.exe
Python 2.4.1 (#1, Apr 17 2005, 12:14:12)
[GCC 3.3 20030304 (Apple Computer, Inc. build 14
> c = None (result of an assignment after the os.environ.get()
returned a KeyError).
Why not trap the KeyError?
--
http://mail.python.org/mailman/listinfo/python-list
Was doing some string formatting, noticed the following:
>>> x = None
>>> "%s" % x
'None'
Is there a reason it maps to 'None'? I had expected ''.
--
http://mail.python.org/mailman/listinfo/python-list