Re: [Zope-dev] manage_options in 2.3

2001-02-08 Thread Tres Seaver

"Chris Withers" <[EMAIL PROTECTED]> wrote:


> > ActivePython 2.0, build 202 (ActiveState Tool Corp.)
> > based on Python 2.0 (#8, Oct 19 2000, 11:30:05) [MSC
> > Type "copyright", "credits" or "license" for more in
> > >>> a = ('a','b','c','d')
> > >>> print type(a)
> > 
> > >>> b = a[1:]
> > >>> print b
> > ('b', 'c', 'd')
> 
> Hmmm... does 'normal' python work like that too? Probably...

$ python
Python 1.5.2 (#1, Feb  1 2000, 16:32:16)  [GCC egcs-2.91.66 19990314/Linux
(egcs- on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> a = ( 1,2,3,4 )
>>> a
(1, 2, 3, 4)
>>> a[ 1:3 ]
(2, 3)

> Ah well, you learn something new every day :-)

Only on the good days -- the bad ones you spend in meetings. :)

Tres.
-- 
===
Tres Seaver[EMAIL PROTECTED]
Digital Creations "Zope Dealers"   http://www.zope.org

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] manage_options in 2.3

2001-02-08 Thread Andy McKay

If ActivePython is "un-normal" python, then yes "normal" python behaves like
that too. :)
--
  Andy McKay.


- Original Message -
From: "Chris Withers" <[EMAIL PROTECTED]>
To: "Andy McKay" <[EMAIL PROTECTED]>; "Brian Lloyd" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 11:10 AM
Subject: Re: [Zope-dev] manage_options in 2.3


> > ActivePython 2.0, build 202 (ActiveState Tool Corp.)
> > based on Python 2.0 (#8, Oct 19 2000, 11:30:05) [MSC
> > Type "copyright", "credits" or "license" for more in
> > >>> a = ('a','b','c','d')
> > >>> print type(a)
> > 
> > >>> b = a[1:]
> > >>> print b
> > ('b', 'c', 'd')
>
> Hmmm... does 'normal' python work like that too? Probably...
>
> Ah well, you learn something new every day :-)
>
> thanks,
>
> Chris
>
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] manage_options in 2.3

2001-02-08 Thread Chris Withers

> ActivePython 2.0, build 202 (ActiveState Tool Corp.)
> based on Python 2.0 (#8, Oct 19 2000, 11:30:05) [MSC
> Type "copyright", "credits" or "license" for more in
> >>> a = ('a','b','c','d')
> >>> print type(a)
> 
> >>> b = a[1:]
> >>> print b
> ('b', 'c', 'd')

Hmmm... does 'normal' python work like that too? Probably...

Ah well, you learn something new every day :-)

thanks,

Chris



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] manage_options in 2.3

2001-02-08 Thread Andy McKay

Yes you can:

ActivePython 2.0, build 202 (ActiveState Tool Corp.)
based on Python 2.0 (#8, Oct 19 2000, 11:30:05) [MSC
Type "copyright", "credits" or "license" for more in
>>> a = ('a','b','c','d')
>>> print type(a)

>>> b = a[1:]
>>> print b
('b', 'c', 'd')
>>> print type(b)

>>>

--
  Andy McKay.


- Original Message -
From: "Chris Withers" <[EMAIL PROTECTED]>
To: "Andy McKay" <[EMAIL PROTECTED]>; "Brian Lloyd" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 10:18 AM
Subject: Re: [Zope-dev] manage_options in 2.3


> > 2.3. The problem is the [2:] which for some reason doesnt want to work,
> when
> > I thought I was accesing a simple tuple.
>
> You can't slice tuples, IIRC, which would explain why that bit fails.
>
> cheers,
>
> Chris
>
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] manage_options in 2.3

2001-02-08 Thread Chris Withers

> 2.3. The problem is the [2:] which for some reason doesnt want to work,
when
> I thought I was accesing a simple tuple.

You can't slice tuples, IIRC, which would explain why that bit fails.

cheers,

Chris



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] manage_options in 2.3

2001-02-08 Thread Andy McKay

Doh, I that was an email typo I would have received a syntax error (I always
run a syntax check prior to trying code, just not putting it in emails).
Anyway I checked it again and it occurs on Zope 2.2.5, so the its a not a
2.3. The problem is the [2:] which for some reason doesnt want to work, when
I thought I was accesing a simple tuple.

Sorry to bother you.

--
  Andy McKay.


- Original Message -
From: "Brian Lloyd" <[EMAIL PROTECTED]>
To: "Andy McKay" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 7:17 AM
Subject: RE: [Zope-dev] manage_options in 2.3


> > Thanks for the new management interface guys I happily wrote a
> > product last
> > night and did a quick interface using the standard Folder interface and
> > fiddled with filtered_meta_types list and dontAllowCutandPaste
> > and so on. A
> > quick How-To will be on its way. I got a wierd error trying to fiddle
with
> > manage_options though, in the olden days something like this worked:
> >
> > manage_options = (
> > ( Folder.manage_options[0], ) +
> > ( {'label':'View', 'action':'my_index_html', ) +
> > ( Folder.manage_options[2:], )
> > )
> >
>
> Dunno if this is the actual problem or just a typo in the
> email:
>
> > manage_options = (
> > ( Folder.manage_options[0], ) +
> > ( {'label':'View', 'action':'my_index_html', ) +
> ^ need to close dict
> w/ }
>
> I suspect its an email typo, though (I would have expected a
> SyntaxError, unless it was being consumed somehow).
>
> Brian Lloyd[EMAIL PROTECTED]
> Software Engineer  540.371.6909
> Digital Creations  http://www.digicool.com
>
>
>
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



RE: [Zope-dev] manage_options in 2.3

2001-02-08 Thread Brian Lloyd

> Thanks for the new management interface guys I happily wrote a
> product last
> night and did a quick interface using the standard Folder interface and
> fiddled with filtered_meta_types list and dontAllowCutandPaste
> and so on. A
> quick How-To will be on its way. I got a wierd error trying to fiddle with
> manage_options though, in the olden days something like this worked:
>
> manage_options = (
> ( Folder.manage_options[0], ) +
> ( {'label':'View', 'action':'my_index_html', ) +
> ( Folder.manage_options[2:], )
> )
>

Dunno if this is the actual problem or just a typo in the
email:

> manage_options = (
> ( Folder.manage_options[0], ) +
> ( {'label':'View', 'action':'my_index_html', ) +
^ need to close dict
w/ }

I suspect its an email typo, though (I would have expected a
SyntaxError, unless it was being consumed somehow).

Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909
Digital Creations  http://www.digicool.com





___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )