Re: Extended slicing and Ellipsis - where are they used?

2007-09-15 Thread Rodney Maxwell
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: > >>>>

Re: Extended slicing and Ellipsis - where are they used?

2007-09-15 Thread Rodney Maxwell
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: > >>>>

Extended slicing and Ellipsis - where are they used?

2007-09-13 Thread Rodney Maxwell
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

Why is 'None' not assignable but 'True'/'False' are?

2006-01-02 Thread Rodney Maxwell
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

Re: python.exe on Mac OS X!?

2005-04-17 Thread Rodney Maxwell
> 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

Re: python.exe on Mac OS X!?

2005-04-17 Thread Rodney Maxwell
>> 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

python.exe on Mac OS X!?

2005-04-17 Thread Rodney Maxwell
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

Re: How to turn a variable name into a string?

2005-03-11 Thread Rodney Maxwell
> 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

None in string formatting

2005-03-08 Thread rodney . maxwell
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