> Programming Languages > Python
Various Topics Home | Disclaimer | Report Adult Posts

Various Topics on Python



Python - "Re: __brace__ (PEP?)" in Programming Languages


Old 05-09-2005   #1
.. ..ldero..
 
Default Re: __brace__ (PEP?)

On Sun, 8 May 2005 16:29:03 -0700, James Stroud <jstroud@mbi.ucla.edu> 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:
>


See Numeric Python, which uses index slices in multiple dimensions to satisfy this use case.

While a new syntactic construct could be introduced to provide this feature, the "minimal core, rich library" school of language design suggests that doing so would not be a great idea.

Jp
 

Thread Tools
Display Modes





Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0