Re: __brace__ (PEP?)

2005-05-11 Thread Terry Hancock
On Sunday 08 May 2005 06:29 pm, James Stroud wrote: > If "__call__" allows anobject() and "__getitem__" allows anobject[arange], > why > not have "__brace__" (or some other, better name) for anobject{something}. > Such braces might be useful for cross-sectioning nested data structures: [...] > T

Re: __brace__ (PEP?)

2005-05-09 Thread Ron Adam
James Stroud wrote: > Hello All, > > If "__call__" allows anobject() and "__getitem__" allows anobject[arange], > why > not have "__brace__" (or some other, better name) for anobject{something}. > Such braces might be useful for cross-sectioning nested data structures: > > anary = [[1,2,3],[4,

Re: __brace__ (PEP?)

2005-05-09 Thread Kay Schluehr
Roy Smith wrote: > "Kay Schluehr" <[EMAIL PROTECTED]> wrote: > > > Roy Smith wrote: > > > > > foo->bar ==> foo.__arrrow__(bar) > > > foo$bar ==> foo.__dollar__(bar) > > > foo#bar ==> foo.__hash__(bar) > > > foo::bar ==> foo.__scope__(bar) > > > > I'm strongly in favor for the arrow ( but with two "

Re: __brace__ (PEP?)

2005-05-09 Thread Roy Smith
"Kay Schluehr" <[EMAIL PROTECTED]> wrote: > Roy Smith wrote: > > > foo->bar ==> foo.__arrrow__(bar) > > foo$bar ==> foo.__dollar__(bar) > > foo#bar ==> foo.__hash__(bar) > > foo::bar ==> foo.__scope__(bar) > > I'm strongly in favor for the arrow ( but with two "r" only ). The > question is simpl

Re: __brace__ (PEP?)

2005-05-08 Thread Kay Schluehr
Roy Smith wrote: > foo->bar ==> foo.__arrrow__(bar) > foo$bar ==> foo.__dollar__(bar) > foo#bar ==> foo.__hash__(bar) > foo::bar ==> foo.__scope__(bar) I'm strongly in favor for the arrow ( but with two "r" only ). The question is simply: for what? > and so on down the list of non-alphanumeric c

Re: __brace__ (PEP?)

2005-05-08 Thread Roy Smith
In article <[EMAIL PROTECTED]>, James Stroud <[EMAIL PROTECTED]> wrote: > On Sunday 08 May 2005 05:15 pm, Roy Smith wrote: > > This seems like a pretty esoteric operation to devote a bit of syntax to. > > It doesn't seem like something people want to do very often. > > Similar to __call__, I don

Re: __brace__ (PEP?)

2005-05-08 Thread James Stroud
On Sunday 08 May 2005 05:15 pm, Roy Smith wrote: > This seems like a pretty esoteric operation to devote a bit of syntax to. > It doesn't seem like something people want to do very often. Similar to __call__, I don't think that this syntax would be neccessarily devoted to any particular operation

Re: __brace__ (PEP?)

2005-05-08 Thread Jp Calderone
On Sun, 8 May 2005 16:29:03 -0700, James Stroud <[EMAIL PROTECTED]> wrote: >Hello All, > >If "__call__" allows anobject() and "__getitem__" allows anobject[arange], why >not have "__brace__" (or some other, better name) for anobject{something}. >Such braces might be useful for cross-sectioning nest

Re: __brace__ (PEP?)

2005-05-08 Thread Roy Smith
James Stroud <[EMAIL PROTECTED]> wrote: > why not have "__brace__" (or some other, better name) > for anobject{something}. Such braces might be useful for > cross-sectioning nested data structures: This seems like a pretty esoteric operation to devote a bit of syntax to. It doesn't seem like s

__brace__ (PEP?)

2005-05-08 Thread James Stroud
Hello All, If "__call__" allows anobject() and "__getitem__" allows anobject[arange], why not have "__brace__" (or some other, better name) for anobject{something}. Such braces might be useful for cross-sectioning nested data structures: anary = [[1,2,3],[4,5,6]] anary{2} ==> [3,6] or for a